Wrong shown version of Astropy
See original GitHub issueDescription
The version of astropy shown is different with different command line. I have carefully checked the environment, and I think this might be a bug of Astropy. And it sometimes causes errors when other packages have dependence on Astropy.
I use the following command lines in Jupyter Notebook:
>>> !pip show astropy
Name: astropy
Version: 5.1
Summary: Astronomy and astrophysics core library
Home-page: http://astropy.org/
Author: The Astropy Developers
Author-email: astropy.team@gmail.com
License: BSD 3-Clause License
Location: /home/duhc/anaconda3/lib/python3.9/site-packages
Requires: packaging, numpy, PyYAML, pyerfa
Required-by: sdss-marvin, photutils, mgefit, gwcs
>>> import astropy
>>> print(astropy.__version__)
>>> print(astropy.__path__)
4.3.1
['/home/duhc/anaconda3/lib/python3.9/site-packages/astropy']
Expected & Actual behavior behavior
We can see, the address of the astropy shown are the same, both are in /home/duhc/anaconda3/lib/python3.9/site-packages/
, while the version of the astropy is different, 5.1 vs 4.3.1.
System Details
Linux-3.10.0-1160.66.1.el7.x86_64-x86_64-with-glibc2.17 Python 3.9.7 (default, Sep 16 2021, 13:09:58) [GCC 7.5.0] Numpy 1.20.3 pyerfa 2.0.0 astropy 4.3.1 Scipy 1.7.1 Matplotlib 3.4.3
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
[4.1RC2] Astropy module may return the wrong version #10760
When I have a PKG-INFO file in the current working dir, astropy shows the version number from this file instead of its hown...
Read more >Known Issues — Astropy v5.2
Upgrading astropy in the Anaconda Python distribution using pip can result in a corrupted install with a mix of files from the old...
Read more >Known Issues — Astropy v1.0.4
Upgrading Astropy in the anaconda python distribution using pip can result in a corrupted install with a mix of files from the old...
Read more >Numpy version issue when using astropy - Stack Overflow
I was curious so just to try, I tried import astropy and of course had the same error. Nevertheless, I do have numpy...
Read more >Troubleshooting — Anaconda documentation
If you have a troubleshooting issue that is not listed here, obtain free support for ... 403 error; HTTP 000 CONNECTION FAILED; Anaconda...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pllim Yes. I have checked that the problem is from the Astropy version embedded in Anaconda, when I use Miniconda instead problem will be solved.
Glad you found the cause and thanks for reporting back, @dutry !