Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error when importing Numpy

I'm running the most recent version of Sage via the terminal in OS 10.14.6. When importing numpy I get the following error,

sage: import numpy
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-d4cdadb62aa7> in <module>()
----> 1 import numpy

/Applications/SageMath/local/lib/python2.7/site-packages/numpy/__init__.py in <module>()
    140     from . import _distributor_init
    141 
--> 142     from . import core
    143     from .core import *
    144     from . import compat

/Applications/SageMath/local/lib/python2.7/site-packages/numpy/core/__init__.py in <module>()
     65         "numpy in {}. One method of fixing this is to repeatedly uninstall "
     66         "numpy until none is found, then reinstall this version.")
---> 67     raise ImportError(msg.format(path))
     68 
     69 from . import numerictypes as nt

ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['/Applications/SageMath/local/lib/python2.7/site-packages/numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.

I've tried repeatedly uninstalling as suggested using pip. However, this did not resolve the issue. The pip uninstall didn't seem to touch the numpy installation mentioned in the error.