尝试在我的终端升级pip。这是我的代码:
(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.
知道问题是什么吗?执行There was a problem confirming the ssl certificate
时,我也会收到相同的错误pip install django
。
修改 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.
答案 0 :(得分:3)
通过以下命令管理修复它(卸载并重新安装pip):
curl https://bootstrap.pypa.io/get-pip.py | python
答案 1 :(得分:1)
一个。检查您的系统日期和时间,看看它是否正确。
湾如果第一个解决方案没有修复它,请尝试使用较低安全性的方法:
pip install --index-url=http://pypi.python.org/simple/linkchecker
这会绕过HTTPS并使用HTTP,只有在您赶时间时才尝试此解决方法。
℃。尝试将pip降级为不使用SSL验证的版本:
pip install pip==1.2.1
然后通过以下方式再次将pip升级回新版本:
pip install --upgrade pip
d。如果上述情况无效,请卸载pip并重新安装。
答案 2 :(得分:0)
您可以使用
获取有关升级失败的更多详细信息 $ pip install --upgrade pip -vvv
会有更多细节帮助您调试它。
尝试
pip --trusted-host pypi.python.org install --upgrade pip
也许有用。
另一种解决方案:
$ pip install certifi
然后运行安装。