使用 pip 安装软件包返回错误 [重复]
Posted
技术标签:
【中文标题】使用 pip 安装软件包返回错误 [重复]【英文标题】:installing packages with pip returns error [duplicate] 【发布时间】:2019-06-13 10:44:20 【问题描述】:前段时间我从https://pip.pypa.io/en/stable/installing/下载了pip 在我意识到我的 python 版本已经带有 pip 之前。我成功地用它来下载 pygame 但现在我正在尝试下载 numpy 并且无论我尝试什么它都会返回以下错误。
我尝试重新安装 pip 和 python,但没有任何改变。我认为这与我从上面的链接意外下载 pip 并拥有两个版本的 pip 有关。当我卸载 pip 时,它不是被卸载的,如果有任何意义的话。无论如何,这只是我的理论。
当我尝试安装任何东西时会发生这种情况
C:\Users\riley>pip install numpy
Collecting numpy
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/numpy/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/numpy/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/numpy/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/numpy/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/numpy/
Could not fetch URL https://pypi.org/simple/numpy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/numpy/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))) - skipping
Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))) - skipping
这也可能与链接有关,因为它会转到错误页面。请帮助我没有我要安装的软件包做任何事情。解决方案将不胜感激。
编辑 这篇文章不是其他问题的重复,因为我不相信该问题的情况或答案与我的有关。
【问题讨论】:
***.com/… 【参考方案1】:试试这个:
C:\Users\riley> pip install --trusted-host pypi.org numpy
更多信息here。
【讨论】:
以上是关于使用 pip 安装软件包返回错误 [重复]的主要内容,如果未能解决你的问题,请参考以下文章