【问题标题】:python InsecurePlatformWarning when downloading pip on Windows (python 2.7.5)在 Windows 上下载 pip 时出现 python InsecurePlatformWarning (python 2.7.5)
【发布时间】:2018-10-30 01:46:37
【问题描述】:

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

但是,我得到了这个:

正在收集 pip c:\users\licar\appdata\local\temp\tmpwp5zx3\pip.zip\pip_vendor\urllib3\util\ssl_.py:339: SNIMissingWarning: An HTTPS request has been made, 但 SNI (Subject Name Indication) 对 TLS 的扩展在此平台上不可用。这可能会导致服务器提供不正确的 TLS 证书,从而导致验证失败。您可以升级到更新版本的 Python 来解决这个问题。欲了解更多信息,请参阅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:真正的 SSLContext 对象不可用。这会阻止 urllib3 正确配置 SSL,并可能导致某些 SSL 连接失败。您可以升级到更新版本的 Python 来解决这个问题。欲了解更多信息,请参阅https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings 在连接被 'SSLError(SSLError(1, '_ssl.c:504: error:1407742E:SSL 例程: 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:SSL 例程: 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):最大重试次数超出 url:/simple/pip/(由 SSLError(SSLError( 1, '_ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)) - 跳过 找不到满足要求 pip 的版本(来自版本:) 没有找到与 pip 匹配的分布

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

【问题讨论】:

标签: python python-2.7 pip


【解决方案1】:

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

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

编辑:我没有看到你的版本(2.7.5)。所以是的,这是一个版本问题。更新python会解决它。

【讨论】:

    【解决方案2】:

    有东西阻止了您的安装。尝试添加代理试试看:

    set HTTP_PROXY=http://<<username>>:<<password>>@<<proxy server>>:<<proxy_port>>
    set HTTPS_PROXY=https://<<username>>:<<password>>@<<proxy server>>:<<proxy_port>>
    

    【讨论】:

      【解决方案3】:

      就我而言,将 python 版本更新为 2.7.16 有效

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-01-21
        • 1970-01-01
        • 1970-01-01
        • 2013-09-10
        • 2019-05-27
        • 2017-04-24
        • 2016-08-08
        • 2019-04-25
        相关资源
        最近更新 更多