PIP的報錯Could not fetch URL https://pypi.org/

問題:pip安裝報錯

Could not fetch URL https://pypi.org/simple/beaker/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/beaker/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)'))) - skipping
  ERROR: Could not find a version that satisfies the requirement beaker (from versions: none)
ERROR: No matching distribution found for beaker
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:1076)'))) - skipping

原因:

可能是 ssl 證書沒有認證。

解決辦法:

pip  --trusted-host pypi.python.org install 安裝包
例如: pip  --trusted-host pypi.python.org install beaker
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章