Python 无法安装 scipy - 冻结在“为 scipy 运行 setup.py 安装”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33848709/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
can't install scipy - freezes on "Running setup.py install for scipy"
提问by Tom83B
when I run
当我跑
sudo pip install -U scipy
it is first downloaded and then it goes on to show
它首先被下载,然后它继续显示
Running setup.py install for scipy
but it freezes there. I tried upgrading pip itself. Worked fine. My pip version is 1.5.4
但它在那里冻结。我尝试升级 pip 本身。工作得很好。我的 pip 版本是 1.5.4
The only error i get is InsecurePlatforWarning. The complete output looks like this:
我得到的唯一错误是 InsecurePlatforWarning。完整的输出如下所示:
tom@tom-ThinkPad-Edge-E430:~$ sudo pip install -U scipy
The directory '/home/tom/.cache/pip/http' or its parent directory
is not owned by the current user and the cache has been disabled.
Please check the permissions and owner of that directory. If
executing pip with sudo, you may want sudo's -H flag.
The directory '/home/tom/.cache/pip' or its parent directory is not
owned by the current user and caching wheels has been disabled.
check the permissions and owner of that directory. If executing pip with
sudo, you may want sudo's -H flag.
Collecting scipy
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90:
InsecurePlatformWarning: A true SSLContext object is not available.
This prevents urllib3 from configuring SSL appropriately and
may cause certain SSL connections to fail. For more information, see
https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading scipy-0.16.1.tar.gz (12.2MB)
100% |████████████████████████████████| 12.2MB 32kB/s
Installing collected packages: scipy
Running setup.py install for scipy
采纳答案by Tom83B
It took unexpectedly long, but it finished after several minutes. So problem solved.
出乎意料地用了很长时间,但几分钟后就结束了。所以问题解决了。
回答by Anand C U
Do
做
sudo apt-get install python-scipy
for python2
对于python2
or
或者
sudo apt-get install python3-scipy
if you don't care about the version. Installs within a few seconds on RPI3
如果你不在乎版本。在 RPI3 上几秒钟内安装