问题
I just updated Astropy to version 3.1.2. Now I'm trying to run a (previously working) Python 3 script that uses it, and it's failing with the following message:
Traceback (most recent call last):
File "./body-local.py", line 3, in <module>
from astropy.time import Time
File "/home/jimc/.local/lib/python3.6/site-packages/astropy/__init__.py", line 121, in <module>
_check_numpy()
File "/home/jimc/.local/lib/python3.6/site-packages/astropy/__init__.py", line 115, in _check_numpy
raise ImportError(msg)
ImportError: Numpy version 1.13.0 or later must be installed to use Astropy
My installed Numpy version is 1.16.2.
回答1:
I had a bad Numpy installation. The solution was to repeatedly uninstall Numpy, as regular user and root, until no more installations were found, then reinstall:
pip3 uninstall numpy
sudo pip3 uninstall numpy
^ Until no more remain, then:
sudo pip3 install numpy
来源:https://stackoverflow.com/questions/55083379/astropy-complaining-about-numpy-version