解决ImportError: numpy.core.multiarray failed to import

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_32458499/article/details/82849577

When I ran into this, it was because I had another version of numpy
installed on my machine in a different location – I had to uninstall
the other (older) version.

一般的解决办法:

pip install -U numpy

也有这样解决的:

$ import numpy as np
$ np.version
'1.8.0rc1'
$ np.path
['/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy']
$ exit()

$ sudo rm -rf /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy
delete older version 1.8.0rc1,newer version 1.11.2 will be used

猜你喜欢

转载自blog.csdn.net/qq_32458499/article/details/82849577