question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong shown version of Astropy

See original GitHub issue

Description

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:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dutrycommented, Jul 22, 2022

@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.

0reactions
pllimcommented, Jul 22, 2022

Glad you found the cause and thanks for reporting back, @dutry !

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found