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

ssl not configured for manylinux docker image #964

Closed
fxxcyz00 opened this issue Jan 27, 2021 · 4 comments
Closed

ssl not configured for manylinux docker image #964

fxxcyz00 opened this issue Jan 27, 2021 · 4 comments

Comments

@fxxcyz00
Copy link

fxxcyz00 commented Jan 27, 2021

Hi,

I am trying to use pip3.8 to install some modules but I get the following error due to SSL not being configured in the manylinux docker image: quay.io/pypa/manylinux1_x86_64

How do I get python3 installed in the docker image and how to get ssl to work so that I can use pip3 install?

I get the following errors when trying to use pip3:

[root@257c8c929650 cmake_cuda_test]# python3.8 -m pip install --user --upgrade setuptools wheel
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/setuptools/
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/setuptools/
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/setuptools/
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/setuptools/
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/setuptools/
Could not fetch URL https://pypi.org/simple/setuptools/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/setuptools/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Requirement already up-to-date: setuptools in /usr/local/lib/python3.8/site-packages (41.2.0)
Collecting wheel
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/wheel/
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/wheel/
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/wheel/
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/wheel/
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/wheel/
Could not fetch URL https://pypi.org/simple/wheel/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/wheel/ (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 wheel (from versions: none)
ERROR: No matching distribution found for wheel
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

@mayeut
Copy link
Member

mayeut commented Feb 7, 2021

@fxxcyz00,

which python3.8 are you using ?
everything works fine on my end:

Matt$ docker run --rm -it quay.io/pypa/manylinux1_x86_64:latest
[root@cfbdf5d280ed /]# /opt/python/cp38-cp38/bin/python3.8 -m pip install --user --upgrade setuptools wheel
Requirement already satisfied: setuptools in /opt/_internal/cpython-3.8.7/lib/python3.8/site-packages (53.0.0)
Requirement already satisfied: wheel in /opt/_internal/cpython-3.8.7/lib/python3.8/site-packages (0.36.2)
[root@cfbdf5d280ed /]# /opt/python/cp38-cp38/bin/python3.8 -m pip install pybind11
Collecting pybind11
  Downloading pybind11-2.6.2-py2.py3-none-any.whl (191 kB)
     |████████████████████████████████| 191 kB 387 kB/s 
Installing collected packages: pybind11
Successfully installed pybind11-2.6.2
[root@cfbdf5d280ed /]#

@fxxcyz00
Copy link
Author

fxxcyz00 commented Feb 9, 2021

Thanks, /opt/python/cp38-cp38/bin/python3.8 works well. Same with yum as well as yum install -y wget.

However when I upgrade cmake to 3.6.2, I get the following errors (due to SSL issues):

# wget https://cmake.org/files/v3.6/cmake-3.6.2.tar.gz
--2021-02-09 00:46:24--  https://cmake.org/files/v3.6/cmake-3.6.2.tar.gz
Resolving cmake.org... 66.194.253.19
Connecting to cmake.org|66.194.253.19|:443... connected.
OpenSSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Unable to establish SSL connection.

@mayeut
Copy link
Member

mayeut commented Feb 9, 2021

You shall not try to install/run wget in the manylinux1 image. The stock OpenSSL is very old on this system and does not support modern TLS protocols.
I'd suggest moving to manylinux2010 or manylinux2014 depending on your use-case / users use-case.
If you're stuck on manylinux1, use curl (preinstalled, which is custom built with a newer OpenSSL) instead of wget.
Please also note you can pip install cmake.

manylinux1 image support will stop at the end of the year. c.f. #994

@mayeut
Copy link
Member

mayeut commented Feb 27, 2021

No update since last answer, assuming fixed. Please re-open if needed.

@mayeut mayeut closed this as completed Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants