使用pip安装软件包会返回错误

时间:2019-01-19 10:53:10

标签: python cmd pip package

前一段时间,我从https://pip.pypa.io/en/stable/installing/下载了点子 在我意识到我所有的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

它也可能与链接有关,因为它转到错误的页面。请帮助我在尝试安装的软件包中什么也做不了。解决方案将不胜感激。

编辑 这篇文章与其他已提出的问题并不重复,因为我不认为这种情况或答案与我的情况有关。

1 个答案:

答案 0 :(得分:1)

尝试一下:

C:\Users\riley> pip install --trusted-host pypi.org numpy

更多信息here

相关问题