[英]I can't upgrade pip: Could not fetch URL https://pypi.python.org/simple/pip/: There was a prόblem confirming the ssl certificate
Trying to upgrade pip in my terminal. 尝试在我的终端上升级点子。 Here's my code: 这是我的代码:
(env) macbook-pro83:zappatest zorgan$ pip install --upgrade pip
Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645) - skipping
Requirement already up-to-date: pip in ./env/lib/python3.5/site-packages
You are using pip version 8.1.2, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Any idea what the problem is? 知道是什么问题吗? I also get the same error There was a problem confirming the ssl certificate
when I perform pip install django
. 我也收到相同的错误执行pip install django
时, There was a problem confirming the ssl certificate
。
Edit pip install --upgrade pip -vvv returns
: 编辑 pip install --upgrade pip -vvv returns
:
1 location(s) to search for versions of pip:
* https://pypi.python.org/simple/pip/
Getting page https://pypi.python.org/simple/pip/
Looking up "https://pypi.python.org/simple/pip/" in the cache
Returning cached "301 Moved Permanently" response (ignoring date and etag information)
Looking up "https://pypi.org/simple/pip/" in the cache
Current age based on date: 23811
Freshness lifetime from max-age: 600
Freshness lifetime from request max-age: 600
Starting new HTTPS connection (1): pypi.org
Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645) - skipping
Installed version (8.1.2) is most up-to-date (past versions: none)
Requirement already up-to-date: pip in ./env/lib/python3.5/site-packages
Cleaning up...
You are using pip version 8.1.2, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
可以通过以下命令对其进行修复(卸载并重新安装pip):
curl https://bootstrap.pypa.io/get-pip.py | python
a. 一种。 Check your system date and time and see whether it is correct. 检查系统日期和时间,看是否正确。
b. b。 If the 1st solution doesn't fix it try using a lower security method: 如果第一个解决方案无法解决,请尝试使用较低的安全性方法:
pip install --index-url=http://pypi.python.org/simple/linkchecker
This bypasses HTTPS and uses HTTP instead, try this workaround only if you are in a hurry. 这会绕过HTTPS并改用HTTP,只有在您急时才尝试此解决方法。
c. C。 Try downgrading pip to a version that does not use SSL verification by: 尝试通过以下方法将pip降级为不使用SSL验证的版本:
pip install pip==1.2.1
and then upgrade pip back again to the newer version by: 然后通过以下方式将pip再次升级回较新版本:
pip install --upgrade pip
d. d。 If nothing of the above works, uninstall pip and reinstall it. 如果以上方法均无效,请卸载pip并重新安装。
You can get more details about upgrade failed by using 您可以使用来获取有关升级失败的更多详细信息
$ pip install --upgrade pip -vvv
there will be more details help you debug it. 会有更多详细信息可帮助您调试它。
Try 尝试
pip --trusted-host pypi.python.org install --upgrade pip
Maybe useful. 也许有用。
Another solution: 另一个解决方案:
$ pip install certifi
then run install. 然后运行安装。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.