在Windows 7中安装Scipy错误

时间:2022-09-27 19:59:41

In a round about way, I corrupted my scipy/numpy installation on my IntelX64/Windows 7/Python 2.7 computer. I did this by trying to play around with some neural network libraries (lasagne/theano).

在一个回合的路上,我在我的IntelX64 / Windows 7 / Python 2.7计算机上损坏了我的scipy / numpy安装。我通过尝试使用一些神经网络库(lasagne / theano)来做到这一点。

To fix this, I completely removed/reinstalled python 2.7.9. After that, I went to http://www.lfd.uci.edu/~gohlke/pythonlibs/ to download and install numpy and scipy with commands:

为了解决这个问题,我完全删除/重新安装了python 2.7.9。之后,我去http://www.lfd.uci.edu/~gohlke/pythonlibs/下载并使用命令安装numpy和scipy:

pip install C:\Users\me\Documents\numpy-1.9.2+mkl-cp27-none-win_amd64.whl

This went well and succeeded. (I can import numpy from python)

这很好并且成功了。 (我可以从python导入numpy)

pip install C:\Users\me\Documents\scipy-0.15.1-cp27-none-win_amd64.whl

This appeared to go well too. Except the error occurs in the python console:

这看起来也很顺利。除了在python控制台中发生错误:

>>> from scipy import stats

Gives:

Traceback (most recent call last):
  File "<stdin>", line1, in <module>
  File "C:\Python27\lib\site-packages\scipy\stats\__init__.py", line 338, in <module>
    from .stats import *
  File "C:\Python27\lib\site-packages\scipy\stats\stats.py", line 184, in <module>
    import scipy.special as special
  File "C:\Python27\lib\site-packages\scipy\special\__init__.py", line 586, in <module>
    from ._ufuncs import *
ImportError: DLL load failed: The specified module could not be found.

I read up on the DLLs required and ran the 'dependency walker' (http://www.dependencywalker.com/) on "c:\python27\lib\site-packages\scipy\special_UFUNCS.PYD" and it seems there are a few DLL files not found.

我阅读了所需的DLL并在“c:\ python27 \ lib \ site-packages \ scipy \ special_UFUNCS.PYD”上运行了'dependency walker'(http://www.dependencywalker.com/),似乎有找不到一些DLL文件。

libifcoremd.dll
libiomp5md.dll
libmmd.dll
msvcr90.dll
dcomp.dll
ieshims.dll

and a 6 files that look like 'api-ms-win-....dll'

From my looking around, people have solved this by reinstalling numpy, then scipy. I have tried that and the same thing occurs.

从我环顾四周,人们通过重新安装numpy,然后scipy来解决这个问题。我试过了,同样的事情发生了。

Has anyone else run into this issue and solved it?

还有其他人遇到过这个问题并解决了吗?

2 个解决方案

#1


I fixed this by a complete removal of everything (python and packages) and then installing everything again.

我通过完全删除所有内容(python和包)然后再安装所有内容来修复此问题。

Just reinstalling the offending packages did not work. Neither did system restore. I will not accept this answer, because removing/installing is a work around to the real problem. I just want to post this to help anyone else in this position.

只是重新安装违规包不起作用。系统还原也没有。我不接受这个答案,因为删除/安装是解决真正问题的方法。我只是想发布这个来帮助其他人担任这个职位。

#2


Simply install 'NumPy-1.9+MKL' from this page, it should work fine.

只需从此页面安装'NumPy-1.9 + MKL',它应该可以正常工作。

Acknowledgement: Another post here :)

致谢:这里的另一篇文章:)

#1


I fixed this by a complete removal of everything (python and packages) and then installing everything again.

我通过完全删除所有内容(python和包)然后再安装所有内容来修复此问题。

Just reinstalling the offending packages did not work. Neither did system restore. I will not accept this answer, because removing/installing is a work around to the real problem. I just want to post this to help anyone else in this position.

只是重新安装违规包不起作用。系统还原也没有。我不接受这个答案,因为删除/安装是解决真正问题的方法。我只是想发布这个来帮助其他人担任这个职位。

#2


Simply install 'NumPy-1.9+MKL' from this page, it should work fine.

只需从此页面安装'NumPy-1.9 + MKL',它应该可以正常工作。

Acknowledgement: Another post here :)

致谢:这里的另一篇文章:)