问题描述
我正在尝试安装scipy,这是我第一次安装Anaconda2 Python时所附带的软件包.运行setup.py文件时,出现以下错误消息...
I'm trying to install scipy, which comes with the package when I first installed Anaconda2 Python. When I run the setup.py file, I get the following error message...
from scipy._lib.six import string_types
ImportError : No module named scipy._lib.six
...尽管scipy/_lib文件夹中有一个名为six.py的文件
... eventhough there is a file called six.py in the scipy/_lib folder
有没有人遇到过这个问题,您如何解决?
Has anyone ever faced this issue and how did you resolve it?
谢谢.
推荐答案
如果已安装Anaconda,则已经安装了SciPy.只需导入即可:
If you have Anaconda installed, SciPy is installed already. Just import it:
>>> import scipy
请勿在setup.py
所在的目录中执行此操作.
Don't do this in the directory where the setup.py
is located.
对于Anaconda,请使用conda
安装软件包:
With Anaconda use conda
to install packages:
conda install scipy
将:
-
请安装SciPy(如果尚未安装)
Either install SciPy, if it is not installed yet,
或将您的软件包更新为最新的可用版本,
Or update your package to latest available version,
或告诉您All requested packages already installed.
.
如果安装了某些东西,将始终显示类似以下提示:
If it installs something there will always be a prompt like:
The following packages will be UPDATED:
<list-of-package-names>
Proceed ([y]/n)?
这篇关于从Anaconda2 Python安装scipy的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!