我试图在Windows上的Python 2.7.10中导入numpy和scipy
我无法通过pip或以下提供的二进制文件安装scipy:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
但我听说Anaconda的标准是numpy和scipy。值得注意的是我可以成功导入numpy。
conda list
打印出所有包,scipy就是其中之一,但导入仍然失败。
当我跑步时
$ conda install scipy
这就是我所看到的:
$ conda install scipy
Fetching package metadata: ....
Solving package specifications: ..................
Package plan for installation in environment c:\Users\Nick\Anaconda2:
The following NEW packages will be INSTALLED:
conda-env: 2.4.4-py27_1
Proceed ([y]/n)? y
Linking packages ...
"Ensuring that c:\Users\Nick\Anaconda2\Library\bin is on user PATH environment variable."
"" was unexpected at this time.
Error: Error: post-link failed for: conda-env-2.4.4-py27_1
当我跑步时
$ conda install -f scipy
这就是我所看到的:
$ conda install -f scipy
Fetching package metadata: ....
Solving package specifications: ..................
Package plan for installation in environment c:\Users\Nick\Anaconda2:
The following packages will be UPDATED:
scipy: 0.16.0-np110py27_0 --> 0.16.0-np110py27_0
Proceed ([y]/n)? y
[ COMPLETE ]|##################################################| 100%
Extracting packages ...
[ COMPLETE ]|##################################################| 100%
Unlinking packages ...
[ COMPLETE ]|##################################################| 100%
Linking packages ...
[ COMPLETE ]|##################################################| 100%
它似乎正在工作,但当我尝试在Python程序的顶部导入scipy时,我得到:
$ python steps.py
Traceback (most recent call last):
File "steps.py", line 16, in <module>
import scipy as st
ImportError: No module named scipy
我输错了吗?
答案 0 :(得分:0)
从我的研究中,特别是github.com/conda/conda/issues/1786,我认为Anaconda 2.4.0因scipy而失败。解决方案是获得更新版本的Anaconda或考虑安装最新的Miniconda。