Ashu
Ashu

Reputation: 343

SSL module not available in Python3.8

I have RHEL6.10 machine where I used below steps to install python3.8

wget https://www.python.org/ftp/python/3.8.16/Python-3.8.16.tar.xz 
tar xcf Python-3.8.16.tar.xz 
cd Python-3.8.16.tar.xz 
./configure 
make altinstall
pip3.8 install shareplum

While using pip command to install any module, I am getting ssl module not found error

[[email protected]]# pip3.8 install shareplum
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
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/shareplum/
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/shareplum/
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/shareplum/
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/shareplum/
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/shareplum/
Could not fetch URL https://pypi.org/simple/shareplum/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/shareplum/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

Even though I checked openssl is installed or not, It is available in machine. Requesting a big help, if anyone can point out the missing piece.

[[email protected]]# openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
[[email protected]]# which openssl
/usr/bin/openssl
[[email protected]]# whereis openssl
openssl: /usr/bin/openssl /usr/lib64/openssl /usr/include/openssl /opt/splunkforwarder/bin/openssl /usr/share/man/man1/openssl.1ssl.gz
[[email protected]]#

Upvotes: 0

Views: 234

Answers (1)

vikalp rusia
vikalp rusia

Reputation: 97

Python 3 needs 1.1.1 or newer OPEN SSL version - https://peps.python.org/pep-0644/

Use openssl latest version I would suggest to use - ./configure --enable-optimizations

In configure you will see something with ssl verify it is yes

This flag enables Profile guided optimization (PGO) and Link Time Optimization (LTO).

Both are expensive optimizations that slow down the build process but yield a significant speed boost (around 10-20% from what I remember reading). what does --enable-optimizations do while compiling python?

Upvotes: 0

Related Questions