在 Windows 上下载 pip 时出现 python InsecurePlatformWarning (python 2.7.5) [英] python InsecurePlatformWarning when downloading pip on Windows (python 2.7.5)

查看:64
本文介绍了在 Windows 上下载 pip 时出现 python InsecurePlatformWarning (python 2.7.5)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了在 Windows 上下载 pip,我按照 https://pip.pypa.io/en/stable/installing/(下载 get-pip.py 文件,然后在命令提示符下运行它).

To download pip on Windows, I followed https://pip.pypa.io/en/stable/installing/ (downloading the get-pip.py file, and then running it on Command Prompt).

但是,我得到了这个:

正在收集 pip c:\users\licar\appdata\local\temp\tmpwp5zx3\pip.zip\pip_vendor\urllib3\util\ssl_.py:339:SNIMissingWarning:已发出 HTTPS 请求,但 SNI(主题Name Indication) 扩展到 TLS 在此平台上不可用.这可能会导致服务器提供不正确的 TLS 证书,从而导致验证失败.您可以升级到更新版本的 Python 来解决此问题.有关更多信息,请参阅 https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warningsc:\users\licar\appdata\local\temp\tmpwp5zx3\pip.zip\pip_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: 一个真正的 SSLContext 对象不可用.这会阻止 urllib3 正确配置 SSL,并可能导致某些 SSL 连接失败.您可以升级到更新版本的 Python 来解决此问题.有关更多信息,请参阅 https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings连接因 'SSLError(SSLError(1, '_ssl.c:504: error:1407742E:SSLroutines:) 中断后重试(重试(总计 = 4,连接 = 无,读取 = 无,重定向 = 无,状态 = 无))SSL23_GET_SERVER_HELLO:tlsv1 警报协议版本'),)':/simple/pip/c:\users\licar\appdata\local\temp\tmpwp5zx3\pip.zip\pip_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: 一个真正的 SSLContext 对象不可用.这会阻止 urllib3 正确配置 SSL,并可能导致某些 SSL 连接失败.您可以升级到更新版本的 Python 来解决此问题.有关更多信息,请参阅 https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings连接因 'SSLError(SSLError(1, '_ssl.c:504: error:1407742E:SSLroutines:) 中断后重试(重试(总计 = 0,连接 = 无,读取 = 无,重定向 = 无,状态 = 无))SSL23_GET_SERVER_HELLO:tlsv1 警报协议版本'),)':/simple/pip/c:\users\licar\appdata\local\temp\tmpwp5zx3\pip.zip\pip_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: 一个真正的 SSLContext 对象不可用.这会阻止 urllib3 正确配置 SSL,并可能导致某些 SSL 连接失败.您可以升级到更新版本的 Python 来解决此问题.有关更多信息,请参阅 https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings无法获取 URL https://pypi.org/simple/pip/:出现问题确认 ssl 证书:HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url:/simple/pip/(Caused by SSLError(SSLError(1, '_ssl.c:504: error:1407742E):SSL 例程:SSL23_GET_SERVER_HELLO:tlsv1 警报协议版本'),)) - 跳过找不到满足 pip 要求的版本(来自版本:)找不到 pip 的匹配分布

Collecting pip c:\users\licar\appdata\local\temp\tmpwp5zx3\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 c:\users\licar\appdata\local\temp\tmpwp5zx3\pip.zip\pip_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. 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 Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/pip/ c:\users\licar\appdata\local\temp\tmpwp5zx3\pip.zip\pip_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. 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 Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/pip/ c:\users\licar\appdata\local\temp\tmpwp5zx3\pip.zip\pip_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. 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 Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, '_ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)) - skipping Could not find a version that satisfies the requirement pip (from versions: ) No matching distribution found for pip

对我能做什么有什么建议吗?我需要使用较新版本的 python 吗?谢谢:)

Any suggestions on what I can do? Do I need to use a newer version of python? Thank you :)

推荐答案

您可以升级到更新版本的 Python 来解决这个问题.

You can upgrade to a newer version of Python to solve this.

所以回答你的问题:是的,获取一个新版本的python.根据文档,您需要 python 2.7.9 或更高版本.

So to answer your question: Yes, get a new version of python. According to the docs, you need python 2.7.9 or higher.

我没有看到你的版本(2.7.5).所以是的,这是一个版本问题.更新python就可以解决.

edit: I didn't see your version (2.7.5). So yes, it is a version issue. Updating python would solve it.

这篇关于在 Windows 上下载 pip 时出现 python InsecurePlatformWarning (python 2.7.5)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆