首页 > 解决方案 > Pip:安装 pip 时:“未找到安装的匹配发行版”SSL 错误

问题描述

描述:

我正在尝试在 Python 2.7.0 上安装 pip。它必须在这个版本中,因为我想使用3Blue1Brown 的 manim。但是,当我尝试安装 pip 时收到此消息: Could not find a version that satisfies the requirement install (from versions : ) No matching distribution found for install

我跑了什么:

当我输入 python get-pip.py 时,我收到了这条消息

```
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None))
 after connection broken by 'SSLError(SSLError(1, '_ssl.c:499: error:1407742E:SS
L routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/ins
tall/
c:\users\snake\appdata\local\temp\tmpbgk_ty\pip.zip\pip\_vendor\urllib3\util\ssl
_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. Th
is 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-us
age.html#ssl-warnings
  Could not fetch URL https://pypi.org/simple/install/: There was a problem conf
irming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max
retries exceeded with url: /simple/install/ (Caused by SSLError(SSLError(1, '_ss
l.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol
 version'),)) - skipping
  Could not find a version that satisfies the requirement install (from versions
: )
No matching distribution found for install
```

我从这个网站下载了 OpenSSL ,当我输入 openssl versioncmd 时,我得到了这个:

OpenSSL 1.0.1f 6 Jan 2014

认为OpenSSL 安装正确,但 Python 没有使用它(假设它应该使用它)。

标签: opensslpip

解决方案


我发现 Python 已经通过 OpenSSL 运行

import ssl
print(ssl.OPENSSL_VERSION)

版本太旧了。而且,如果可能的话,一位用户告诉我更新其 OpenSSL 会非常复杂。因此,我所做的只是简单地下载 Python 2.7.15 并解决了。


推荐阅读