Repository navigation
pip3.10.4 is configured with locations that require TLS/SSL, however the ssl module in Python is not available #91357
Description
Activity
alessandropioli commented
on Apr 2, 2022 alessandropiolimannequinMannequinAuthorMore actionsAfter installation of 3.4.10 with openssl procedure https://docs.python.org/3/using/unix.html#on-linux
on centos 7.9
pip get this error:pip3.10 install -r requirements.txt
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/jinja2/
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/jinja2/
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/jinja2/
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/jinja2/
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/jinja2/
Could not fetch URL https://pypi.org/simple/jinja2/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/jinja2/ (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 Jinja2 (from versions: none)
ERROR: No matching distribution found for Jinja2
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.")) - skippingCentOS 7 has an unsupported OpenSSL version. You need to build your own OpenSSL or use my work from https://github.com/tiran/cpython_builddep/#note
sudo yum install -y epel
sudo yum install -y openssl11-devel
sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configureReacted by 白開水I have this same issue on Raspberry Pi OS. During
sudo make altinstallI get:Could not build the ssl module! Python requires a OpenSSL 1.1.1 or newerEven though
openssl versiongivesOpenSSL 1.1.1n 15 Mar 2022.I have this same issue on Raspberry Pi OS. During
sudo make altinstallI get:You are missing the OpenSSL development package. Install
libssl-devfirst.You are missing the OpenSSL development package. Install libssl-dev first.
That worked, thank you!
@tiran, can this be closed?
Do we need to document this in the devguide and/or elsewhere?- addedpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
on Jun 10, 2022 Build dependencies are documented in the devguide, https://devguide.python.org/setup/#build-dependencies
- removedpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
on Jun 19, 2022 OpenSSL 3.0.0 7 sep 2021 (Library: OpenSSL 3.0.0 7 sep 2021)
python 3.11.4WARNING: 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/pip/
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/pip/
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/pip/
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/pip/
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/pip/
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
ERROR: Could not find a version that satisfies the requirement pip (from versions: none)
ERROR: No matching distribution found for pip
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.")) - skippingAny solution for this?
first install openssl:
sudo yum -y groupinstall "Development Tools"
wget https://www.openssl.org/source/openssl-3.0.9.tar.gz
tar xvf openssl-3.0.9.tar.gz
cd openssl-3.0.9/
./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
make -j $(nproc)
sudo make install
sudo ldconfig
sudo tee /etc/profile.d/openssl.sh<<EOF
export PATH=/usr/local/openssl/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/openssl/lib:$LD_LIBRARY_PATH
EOF
source /etc/profile.d/openssl.shnext install python:
wget https://www.python.org/ftp/python/3.11.4/Python-3.11.4.tgz
tar xvf Python-3.11.4.tgz
cd Python-3.11*/
LDFLAGS="${LDFLAGS} -Wl,-rpath=/usr/local/openssl/lib" ./configure --with-openssl=/usr/local/openssl
make
sudo make altinstallimportant note: u have to sure about openssl location. so fixed addresses to right location
Reacted by Canh.Bui, John Xu, dravenlove and ilightmanfirst install openssl:
sudo yum -y groupinstall "Development Tools" wget https://www.openssl.org/source/openssl-3.0.9.tar.gz tar xvf openssl-3.0.9.tar.gz cd openssl-3.0.9/ ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl make -j $(nproc) sudo make install sudo ldconfig sudo tee /etc/profile.d/openssl.sh<<EOF export PATH=/usr/local/openssl/bin:$PATH export LD_LIBRARY_PATH=/usr/local/openssl/lib:$LD_LIBRARY_PATH EOF source /etc/profile.d/openssl.sh
next install python: wget https://www.python.org/ftp/python/3.11.4/Python-3.11.4.tgz tar xvf Python-3.11.4.tgz cd Python-3.11*/ LDFLAGS="${LDFLAGS} -Wl,-rpath=/usr/local/openssl/lib" ./configure --with-openssl=/usr/local/openssl make sudo make altinstall
important note: u have to sure about openssl location. so fixed addresses to right location
Worked, thank you!
CentOS 7 has an unsupported OpenSSL version. You need to build your own OpenSSL or use my work from https://github.com/tiran/cpython_builddep/#note
sudo yum install -y epel sudo yum install -y openssl11-devel sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure
sudo yum install -y epel-release.noarch
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields: