【发布时间】:2018-10-08 05:50:44
【问题描述】:
我正在尝试通过运行命令 python get-pip.py 将 pip 安装到我的 Windows 笔记本电脑上,但我收到以下错误:c:\appdata\temp\tmplplp3q\pip.zip\pip\_vendor\urllib3\util\ssl_.py:339: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
我的 python 版本是 2.7.9。任何帮助将不胜感激!谢谢
建议的副本与我的问题不同,因为我无法安装 pip,并且在我可以尝试下载任何软件包之前,错误已经给出。
【问题讨论】:
-
你从bootstrap.pypa.io/get-pip.py下载了get-pip.py?尝试获取 2.6 版本:bootstrap.pypa.io/2.6/get-pip.py.
-
是的,没错。我刚刚尝试了 2.6,但不幸的是仍然给出了相同的 SSL 错误。
-
Python2.6 是用什么 OpenSSL 版本构建的?您可以通过在控制台中输入
import ssl、ssl.OPENSSL_VERSION来查找。你可能不喜欢你要找到的东西:) -
@phd 这不是一个骗局。错误发生在指定问题之前。