ImportError:无法导入名称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
我正在Windows 10下使用python 2.7。
我已经安装了,scipy
但是似乎无法解决问题
任何帮助表示赞赏。
-
如果查看引起错误的行,则会看到以下内容:
from numpy._distributor_init import NUMPY_MKL # requires numpy+mkl
该行注释将依赖项声明为
numpy+mkl
(numpy
对于 Intel Math Kernel
Library )。这意味着您已经安装了numpy
by
pip
,但是thescipy
是由预编译的存档安装的,其期望值为numpy+mkl
。通过
numpy+mkl
从此处的whl文件安装可以轻松解决此问题。