New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Astropy 2.0 Tables Not Importing in Python 2.7 #6358
Comments
Does the error also occur if you just try to |
It does not happen if I just import numpy or
|
ok, I can't replicate this locally. Maybe something went wrong with the conda package for mac, numpy=1.13 and python 2.7. It works on windows and on my VM Linux. |
Hmm a search in the Internet gave me tensorflow/tensorflow#559. Do you have an older Numpy version installed somewhere in your PYTHONPATH? |
@dborncamp can you run |
I don't think there are multiple version of numpy floating around...
|
Try |
Looking at the paths it looks like it is pulling a numpy that is not within my conda environment and is not the version found in the conda env. Not sure why it is picking that version up since it is not in my (astroTest071017) bash 3% python
Python 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:05:08)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import numpy
>>> print numpy
<module 'numpy' from '/usr/local/lib/python2.7/site-packages/numpy/__init__.pyc'>
>>> from astropy import _erfa
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/dborncamp/miniconda2/envs/astroTest071017/lib/python2.7/site-packages/astropy/_erfa/__init__.py", line 4, in <module>
from .core import *
File "/Users/dborncamp/miniconda2/envs/astroTest071017/lib/python2.7/site-packages/astropy/_erfa/core.py", line 42, in <module>
from . import _core
ImportError: numpy.core.multiarray failed to import
>>> from numpy.core import multiarray
>>> print multiarray
<module 'numpy.core.multiarray' from '/usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so'>
>>> numpy.__version__
'1.12.1'
>>> exit()
(astroTest071017) bash 3% echo $PYTHONPATH
/usr/local/opt/opencv3/lib/python2.7/site-packages/:/Users/dborncamp/common/common/:/user/dborncamp/pylib/:
(astroTest071017) bash 4% ls /Users/dborncamp/miniconda2/envs/astroTest071017/lib/python2.7/site-packages/numpy/core/multiarray.so
/Users/dborncamp/miniconda2/envs/astroTest071017/lib/python2.7/site-packages/numpy/core/multiarray.so |
Whats the value of |
Not sure why the wrong version is even in my path but it appears to be loaded first. Perhaps this is an issue with conda? Maybe I have an older version...
|
Updating my version of conda fixed it
Reinstall and it worked:
|
When I try to import astropy tables using the current anaconda build (using numpy 1.13.1) I get a numpy error. But when I downgrade to numpy 1.12.1 it works. Seems like issue with numpy 1.13.
Try again with older Numpy:
The text was updated successfully, but these errors were encountered: