Error when importing scipy

When trying to import scipy I get the error:

ImportError                               Traceback (most recent call last)
C:Program FilesINROEmmeEmme 4Emme-4.2.7python-libwin642.7modellerinro.director.applicationinrodirectorapplicationrun.pyc in <module>()
----> 1 import scipy

C:Program FilesINROEmmeEmme 4Emme-4.2.7Python27libsite-packagesscipy__init__.py in <module>()
     59 __all__ = ['test']
     60
---> 61 from numpy._distributor_init import NUMPY_MKL  # requires numpy+mkl
     62
     63 from numpy import show_config as show_numpy_config

ImportError: No module named _distributor_init

I installed numpy and scipy from http://www.lfd.uci.edu/~gohlke/pythonlibs/
By checking numpy.show_config() I believe I am indeed using a numpy with Intel MKL.
Using Python 2.7.9 in windows 10 .


you can install it handy ... by that :

you should uninstall your numpy if you have it by

pip uninstall numpy

then you have to install wheel package which help you with handy package installing :

pip install wheel

then go to http://www.lfd.uci.edu/%7Egohlke/pythonlibs/ .. find and download your appropriate package ( something like numpy‑1.13.0+mkl‑cp36‑cp36m‑win_amd64.whl which include +mkl and it ends with .whl after the download has completed you can install it with pip

pip install "pathname of the file"

for example :

pip install C:usersuserdownloadsnumpy‑1.13.0+mkl‑cp36‑cp36m‑win_amd64.whl

if its failed you have to download the 32bit ones .... some thing like numpy‑1.13.0+mkl‑cp36‑cp36m‑win32.whl

now you have the numpy package with mkl so your scipy package works well... enjoy it


u can import simply by using command prompt...if everything is installed correctly

import scipy as sp

链接地址: http://www.djcxy.com/p/87182.html

上一篇: 指示Python在另一个文件夹中查找模块

下一篇: 导入scipy时出错