【问题标题】:Could not fetch URL installing python packages installation无法获取安装 python 包安装的 URL
【发布时间】:2021-06-08 05:12:45
【问题描述】:

我正在尝试从命令提示符安装一些 python 包,但它显示了以下问题,我设置了代理以解决防火墙问题。但问题仍然存在。在我设置代理之前,我无法安装任何软件包,之后我可以安装 numpy,但没有别的。 Could not fetch URL https://pypi.org/simple/scipy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/scipy/ (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123)'))) - skipping

【问题讨论】:

    标签: python installation pip


    【解决方案1】:

    有时,如果您在计算机上使用 Python 2 和 Python 3,pip 将默认使用 Python 2。截至 2021 年 1 月 1 日,Python 2 is no longer supported。因此,Python 2 不再支持很多包。请尝试以下操作:

    pip3 install scipy
    

    pip3 始终只在 Python3 环境中运行,就像 pip2 对 Python2 一样。

    【讨论】:

    • 非常感谢您的回答。问题实际上是在设置代理时,我不得不使用 http 而不是使用 https。非常感谢!
    猜你喜欢
    • 2021-11-10
    • 2011-06-14
    • 2021-01-23
    • 2018-09-19
    • 1970-01-01
    • 2016-09-12
    相关资源
    最近更新 更多