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
上一篇:java-找不到证书链,但是密钥库包含私钥


下一篇:《More Effective C++》摘录