ImportError: numpy.core.multiarray failed to import ImportError: numpy.core.multiarray failed to import python python

ImportError: numpy.core.multiarray failed to import


I was getting the same error and was able to solve it by updating my numpy installation to 1.8.0:

pip install -U numpy


In the case that

pip install -U numpy 

doesn't work (even with sudo), you may want to make sure you're using the right version of numpy. I had the same "numpy.core.multiarray failed to import" issue, but it was because I had 1.6 installed for the version of Python I was using, even though I kept installing 1.8 and assumed it was installing in the right directory.

I found the bad numpy version by using the following command in my Mac terminal:

python -c "import numpy;print(numpy.__version__);print(numpy.__file__)";

This command gave me the version and location of numpy that I was using (turned out it was 1.6.2). I went to this location and manually replaced it with the numpy folder for 1.8, which resolved my "numpy.core.multiarray failed to import" issue. Hopefully someone finds this useful!

Note: For the command, use double underscore before and after 'version' and 'file'


If you want a specific version:

pip install numpy==1.8