我从这里安装了 python3.7 https://tecadmin.net/install-python-3-6-on-centos/
尝试使用/升级/安装 pip 时出现以下错误:
[cloudera@quickstart Python-3.7.6rc1]$ sudo pip3 install --upgrade
WARNING: pip is configured with locations that require TLS/SSL,
however the ssl module in Python is not available.
ERROR: You must give at least one requirement to install (see "pip
help install")
WARNING: pip is configured with locations that require TLS/SSL,
however the ssl module in Python is not available.
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("Can't connect to HTTPS URL because the SSL module is not
available.")) - skipping
版本信息[cloudera@quickstart Python-3.7.6rc1]$ pip3 --version
pip 19.2.3 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
[cloudera@quickstart Python-3.7.6rc1]$ whereis pip3
pip3: /usr/local/bin/pip3 /usr/local/bin/pip3.7
[cloudera@quickstart Python-3.7.6rc1]$ whereis pip
pip: /usr/bin/pip2.6 /usr/bin/pip /usr/local/bin/pip3.7
[cloudera@quickstart Python-3.7.6rc1]$ python3 --version
Python 3.7.6rc1
[cloudera@quickstart Python-3.7.6rc1]$ whereis openssl
openssl: /usr/src/openssl-1.0.2o/openssl.doxy
/usr/src/openssl-1.0.2o/openssl.spec
/usr/src/openssl-1.0.2o/openssl.pc /usr/bin/openssl /usr/lib64/openssl
/usr/local/bin/openssl /usr/include/openssl
/usr/share/man/man1/openssl.1ssl.gz
我尝试了此处针对此错误建议的几个命令,但没有任何帮助。你能帮助我吗?更新
[cloudera@quickstart Python-3.7.6rc1]$ sudo pip3 install upgrade pip
WARNING: pip is configured with locations that require TLS/SSL,
however the ssl module in Python is not available.
Collecting upgrade
WARNING: Retrying (Retry(total=4, connect=None, read=None,
redirect=None, status=None)) after connection broken by
'SSLError("Can't connect to HTTPS URL because the SSL module is not
available.")': /simple/upgrade/
WARNING: Retrying (Retry(total=3, connect=None, read=None,
redirect=None, status=None)) after connection broken by
'SSLError("Can't connect to HTTPS URL because the SSL module is not
available.")': /simple/upgrade/
WARNING: Retrying (Retry(total=2, connect=None, read=None,
redirect=None, status=None)) after connection broken by
'SSLError("Can't connect to HTTPS URL because the SSL module is not
available.")': /simple/upgrade/
WARNING: Retrying (Retry(total=1, connect=None, read=None,
redirect=None, status=None)) after connection broken by
'SSLError("Can't connect to HTTPS URL because the SSL module is not
available.")': /simple/upgrade/
WARNING: Retrying (Retry(total=0, connect=None, read=None,
redirect=None, status=None)) after connection broken by
'SSLError("Can't connect to HTTPS URL because the SSL module is not
available.")': /simple/upgrade/
Could not fetch URL https://pypi.org/simple/upgrade/: There was a
problem confirming the ssl certificate:
HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded
with url: /simple/upgrade/ (Caused by SSLError("Can't connect to HTTPS
URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement
upgrade (from versions: none)
ERROR: No matching distribution found for upgrade
WARNING: pip is configured with locations that require TLS/SSL,
however the ssl module in Python is not available.
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("Can't connect to HTTPS URL because the SSL module is not
available.")) - skipping
最佳答案
您可能缺少对 Python 的一些基本要求。尝试安装所有这些sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
关于python - pip3 无法获取 URL https ://pypi. org/simple/pip/:确认 ssl 证书时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64404748/