python environment: python 3.8
Error message:
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pip3
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/pip3/
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/pip3/
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/pip3/
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/pip3/
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/pip3/
Could not fetch URL https://pypi.org/simple/pip3/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip3/ (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 pip3 (from versions: none)
ERROR: No matching distribution found for pip3
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
Method of mounting python 3.8: CentOS installation method httprunner
Excuting an order:
#pip install httprunner
Error: Failed to use pip command, see the top of the "error message"
Solution: Upgrade openssl
1, View openssl version
# openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
# cat /etc/issue
CentOS release 6.6 (Final)
Kernel \r on an \m
Reason: The system version centos6.6, which openssl version of OpenSSL 1.0.1e-fips 11 Feb 2013, and python3.8 need for openssl version 1.0.2 or 1.1.x, openssl need to upgrade and recompile python3.8.0.
Note: yum install openssl versions are relatively low.
2, download OpenSSL
# Wget https://www.openssl.org/source/openssl-1.1.1a.tar.gz
#tar -zxvf OpenSSL-1.1.1a.tar.gz
#cd OpenSSL 1.1.1a-
3, compiled installation
#. / config --prefix = / usr / local / openssl no-zlib # need not zlib
#make && the make the install
. 4, the original configuration backup
#mv / usr / bin / OpenSSL /usr/bin/openssl.bak
#mv / usr / the include / OpenSSL / /usr/include/openssl.bak
. 5, the new configuration
#ln -s / usr / local / OpenSSL / the include / OpenSSL / usr / the include / OpenSSL
#ln -s / usr / local / OpenSSL / lib / libssl.so.1.1 /usr/local/lib64/libssl.so
#ln -s / usr / local / openssl / bin / openssl / usr / bin / openssl
. 6, system configuration changes
1) write library file openssl Search path
#echo "/ usr / local / openssl / lib" >> /etc/ld.so.conf
2) /etc/ld.so.conf the changes to take effect after
#ldconfig -v
7, see openssl version
# openssl version
OpenSSL 1.1.1a 20 Nov 2018
8, re-install python
Python into the unzipped folder, execute
#. / The configure --prefix = / usr / local / python3 --with-OpenSSL = / usr / local / OpenSSL
#make
#make install
------------------------------------------------------Tanwheey--------------------------------------------------
Love life, love work.