簡體   English   中英

無法安裝 scipy - 凍結在“為 scipy 運行 setup.py 安裝”

[英]can't install scipy - freezes on "Running setup.py install for scipy"

當我跑

sudo pip install -U scipy

它首先被下載,然后它繼續顯示

Running setup.py install for scipy

但它在那里凍結。 我嘗試升級 pip 本身。 工作得很好。 我的 pip 版本是 1.5.4

我得到的唯一錯誤是 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

出乎意料地用了很長時間,但幾分鍾后就結束了。 所以問題解決了。

sudo apt-get install python-scipy

對於python2

或者

sudo apt-get install python3-scipy

如果你不在乎版本。 在 RPI3 上幾秒鍾內安裝

將交換大小從 100M 增加到 1024M 解決了具有 1G RAM 的 Raspberry Pi 3 上的問題。 仍然需要很長時間(~1 小時)但不再凍結。

(在https://github.com/scipy/scipy/issues/9434上找到了這個提示)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM