Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip3.10.4 is configured with locations that require TLS/SSL, however the ssl module in Python is not available #91357

Closed
alessandropioli mannequin opened this issue Apr 2, 2022 · 11 comments
Labels
3.10 only security fixes topic-installation

Comments

@alessandropioli
Copy link
Mannequin

alessandropioli mannequin commented Apr 2, 2022

BPO 47201
Nosy @tiran

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:

assignee = None
closed_at = None
created_at = <Date 2022-04-02.15:10:50.216>
labels = ['expert-installation', '3.10']
title = 'pip3.10.4 is configured with locations that require TLS/SSL, however the ssl module in Python is not available'
updated_at = <Date 2022-04-02.19:35:32.607>
user = 'https://bugs.python.org/alessandropioli'

bugs.python.org fields:

activity = <Date 2022-04-02.19:35:32.607>
actor = 'christian.heimes'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Installation']
creation = <Date 2022-04-02.15:10:50.216>
creator = 'alessandro.pioli'
dependencies = []
files = []
hgrepos = []
issue_num = 47201
keywords = []
message_count = 2.0
messages = ['416558', '416580']
nosy_count = 2.0
nosy_names = ['christian.heimes', 'alessandro.pioli']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue47201'
versions = ['Python 3.10']

@alessandropioli
Copy link
Mannequin Author

alessandropioli mannequin commented Apr 2, 2022

After 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.")) - skipping

@alessandropioli alessandropioli mannequin added 3.10 only security fixes topic-installation labels Apr 2, 2022
@tiran
Copy link
Member

tiran commented Apr 2, 2022

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

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@jacoblapenna
Copy link

jacoblapenna commented Apr 21, 2022

I have this same issue on Raspberry Pi OS. During sudo make altinstall I get:

Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer

Even though openssl version gives OpenSSL 1.1.1n 15 Mar 2022.

@tiran
Copy link
Member

tiran commented Apr 22, 2022

I have this same issue on Raspberry Pi OS. During sudo make altinstall I get:

You are missing the OpenSSL development package. Install libssl-dev first.

@jacoblapenna
Copy link

You are missing the OpenSSL development package. Install libssl-dev first.

That worked, thank you!

@ezio-melotti
Copy link
Member

@tiran, can this be closed?
Do we need to document this in the devguide and/or elsewhere?

@ezio-melotti ezio-melotti added the pending The issue will be closed if no feedback is provided label Jun 10, 2022
@tiran
Copy link
Member

tiran commented Jun 10, 2022

Build dependencies are documented in the devguide, https://devguide.python.org/setup/#build-dependencies

@AA-Turner AA-Turner removed the pending The issue will be closed if no feedback is provided label Jun 19, 2022
@mkfcga
Copy link

mkfcga commented Jul 6, 2023

OpenSSL 3.0.0 7 sep 2021 (Library: OpenSSL 3.0.0 7 sep 2021)
python 3.11.4

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/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.")) - skipping

@csipapicsa
Copy link

Any solution for this?

@mkfcga
Copy link

mkfcga commented Feb 2, 2024

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.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

@canhbd
Copy link

canhbd commented May 5, 2024

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.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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.10 only security fixes topic-installation
Projects
None yet
Development

No branches or pull requests

8 participants