简体   繁体   English

我无法升级pip:无法获取URL https://pypi.python.org/simple/pip/:存在一个确认ssl证书的问题

[英]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.

相关问题 pip3 无法获取 URL https://pypi.org/simple/pip/:确认 ssl 证书时出现问题 - pip3 Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate Python pip错误:“无法获取索引基URL https://pypi.python.org/simple/” - Python pip error: “Cannot fetch index base URL https://pypi.python.org/simple/” 无法获取 URL https://pypi.org/simple/tensorflow-gpu/:确认 ssl 证书时出现问题 - Could not fetch URL https://pypi.org/simple/tensorflow-gpu/: There was a problem confirming the ssl certificate curl https://pypi.python.org/simple/pip不返回任何内容 - curl https://pypi.python.org/simple/pip returns nothing 无法安装Django-无法获取索引基本URL https://pypi.python.org/simple/ - Can't install Django - Cannot fetch index base URL https://pypi.python.org/simple/ pip 连接失败:无法获取索引基 URL http://pypi.python.org/simple/ - pip connection failure: cannot fetch index base URL http://pypi.python.org/simple/ 无法获取索引库 URL https://pypi.python.org/simple/ ~ 安装后 Python 3 OS X - Cannot fetch index base URL https://pypi.python.org/simple/ ~ After Installing Python 3 OS X 配置pip以从pypi.python.org获取丢失的软件包 - configure pip to get missing package from pypi.python.org 当pip.conf指定其他位置时,为什么pip试图到达pypi.python.org? - Why is pip trying to reach pypi.python.org when pip.conf specifies elsewhere? 如何解决 ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443) with pip? - How to solve ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443) with pip?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM