Visitar URL original
pip3.10.4 is configured with locations that require TLS/SSL, however the ssl module in Python is not available · Issue #91357 · python/cpython · GitHub
Skip to content

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

Description

@alessandropioli
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']

Activity

  1. alessandropioli commented on Apr 2, 2022

    alessandropiolimannequin
    MannequinAuthor

    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

  2. tiran commented on Apr 2, 2022

    @tiran
    Member

    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

  3. transferred this issue fromon Apr 10, 2022
  4. jacoblapenna commented on Apr 21, 2022

    @jacoblapenna

    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.

  5. tiran commented on Apr 22, 2022

    @tiran
    Member

    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.

  6. jacoblapenna commented on Apr 22, 2022

    @jacoblapenna

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

    That worked, thank you!

  7. ezio-melotti commented on Jun 10, 2022

    @ezio-melotti
    Member

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

  8. added
    pendingThe issue will be closed if no feedback is provided
    on Jun 10, 2022
  9. tiran commented on Jun 10, 2022

    @tiran
    Member

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

  10. removed
    pendingThe issue will be closed if no feedback is provided
    on Jun 19, 2022
  11. mkfcga commented on Jul 6, 2023

    @mkfcga

    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

  12. csipapicsa commented on Feb 2, 2024

    @csipapicsa

    Any solution for this?

  13. mkfcga commented on Feb 2, 2024

    @mkfcga

    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

  14. canhbd commented on May 5, 2024

    @canhbd

    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!

  15. cshaptx4869 commented on Nov 18, 2024

    @cshaptx4869

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions