I need to install Numpy version 1.17.1, but every time it just freezes. I have now tried multiple times and I have been waiting over 25 min seeing the same screen.
Is this a known issue or am I facing an issue with installing?
我使用的操作系统是我的树莓派 3 上的 Ubuntu。
延迟这么久是因为numpy
正在您的 Raspberry Pi 上编译。要查看幕后发生的情况,您可以运行pip3
with --verbose
.
$ pip3 install --verbose numpy==1.17.1
这将使您更好地理解所遇到的问题。
为了解决这个问题,我建议添加https://www.piwheels.org https://www.piwheels.org作为包的额外索引,以便您可以获得预编译的wheels https://www.python.org/dev/peps/pep-0427/在您的 Raspberry Pi 上,为您节省大量时间。
为了在您的系统上全局添加额外的索引,您所需要做的就是编辑(或创建)一个文件/etc/pip.conf
包含以下内容:
[global]
extra-index-url=https://www.piwheels.org/simple
之后,您应该看到类似以下内容:
$ pip3 install numpy==1.17.1
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting numpy==1.17.1
Downloading https://www.piwheels.org/simple/numpy/numpy-1.17.1-cp37-cp37m-linux_armv7l.whl (10.5MB)
|████████████████████████████████| 10.5MB 7.1MB/s
Installing collected packages: numpy
Successfully installed numpy-1.17.1
注意:在 Raspberry Pi 4 上测试。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)