SSL: CERTIFICATE_VERIFY_FAILED error from Python pip in Ubuntu 16.0.4
python pip突然停止工作,并给出ssl:certificate_verify_failed错误。我无法安装任何PIP包。sudo pip install scikit映像引发以下错误
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)'),)': /simple/scikit-image/
Could not fetch URL https://pypi.python.org/simple/scikit-image/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/scikit-image/ (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)'),)) - skipping
我尝试使用
谢谢您
它可能与最近PYPI域的变化有关。变更公告:https://pyfound.blogspot.com/2018/03/warehouse-all-new-pypi-is-now-in-beta.html网站https://pyfound.blogspot.com/2017/01/time-to-upgrade-your-python-tls-v12.html
如果从代理/防火墙后面运行PIP,请确保它允许访问/来自:
- PyPI.Org
- 文件.pythonhosted.org
此外,您还可以尝试某些
如果过时的OS根证书有问题,PIP使用URLLIB3和certifi库进行SSL证书验证和TLS连接。你可以尝试一下:
如果仍然不行,请浏览pypi.org并从"下载文件"部分下载python certifi包,然后手动安装:
顺便说一句,与
对于全系统的包部署,Ubuntu希望我们使用