gpt4 book ai didi

python - 无法在Python3、Ubuntu14.04中使用pip安装NumPy

转载 作者:太空宇宙 更新时间:2023-11-03 14:41:20 26 4
gpt4 key购买 nike

尝试 pip install NumPy 时出现此错误:

pip 配置了需要 TLS/SSL 的位置,但是 Python 中的 ssl 模块不可用。

Collecting numpy

Could not fetch URL https://pypi.python.org/simple/numpy/: There was a problem confirming the ssl certificate:

Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy

有人知道怎么解决吗?

最佳答案

解决方案 1:也许尝试使用 sudo -E:

 -E          The -E (preserve environment) option indicates to the secu‐
rity policy that the user wishes to preserve their existing
environment variables. The security policy may return an
error if the -E option is specified and the user does not
have permission to preserve the environment.

解决方案 2:代理可能会对此产生影响。所以:

sudo pip --proxy=http://username:password@proxyURL:portNumber install your-package

关于python - 无法在Python3、Ubuntu14.04中使用pip安装NumPy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42921867/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com