我试图运行下面简单的代码导入错误:无法导入名称NUMPY_MKL
import scipy
scipy.test()
但我收到以下错误
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 586, in runfile
execfile(filename, namespace)
File "C:/Users/Mustafa/Documents/My Python Code/SpectralGraphAnalysis/main.py", line 8, in <module>
import scipy
File "C:\Python27\lib\site-packages\scipy\__init__.py", line 61, in <module>
from numpy._distributor_init import NUMPY_MKL # requires numpy+mkl
ImportError: cannot import name NUMPY_MKL
我使用python 2.7在Windows下10
我已经安装了scipy
,但似乎没有解决问题
任何帮助表示赞赏。
该解决方案为我在Windows上运行Python 2.7.10工作 – ScottMcC
@VMAtm Can我们在相同的virtualenvs中都安装了numpy(来自pip)和numpy + mkl(来自预编译的库)? – StrawhatLuffy
据我所知,答案是否定的。它们互相之间是互不相通的,因为它最后是一个numpy,只有一些处理器指令(如果我理解的很好) – VMAtm