pip: Cannot install pip for python3.7 on Ubuntu 16.04 32bits :
Environment
- pip version: Not installed yet for python3.7
- Python version:
Python 3.7.0 - OS: Ubuntu 16.04 32bits
Description
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Expected behavior
The installation should be working How to Reproduce
- Run
curl -qs https://bootstrap.pypa.io/get-pip.py | sudo -H /usr/bin/python3.7 -
Output
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
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (7 by maintainers)
@deveshks Pb. solved. After upgrading from Ubuntu 14.04 32b, the deadsnakes repo was disabled and the
python3.7package was NOT upgraded :Now, it is solved :
To be honest, the answer is to request that the maintainers of that repository package the latest version of pip.
Or you can do a
--userinstall of pip, but you’ll need to make sure yourPATHis set correctly, so that your user install gets used in preference to the system install. (And I have a nasty feeling that Ubuntu patches pip in a way that makes user installs slightly non-standard, so you’ll need to be prepared for that.Unfortunately it is all very system-dependent, and not somethingthe pip maintainers can necessarily help with (the wrapper in
/usr/bin/pip3isn’t installed or owned by pip, so we have no real control over what it does. The issue #5599 linked in the message you get is the best resource we have for people hitting issues in this area - it’s intended for users to share their experiences and help each other out.IIUC, that command might be upgrading the pip which is packaged with the python installation you used. Perhaps you can see
which pipandpip --versionto be sure.@uranusjr If it’s not possible to use
httponly locations, then replace this warning by an error :ERROR: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.instead of :WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.The relevant code which raises the warning is
https://github.com/pypa/pip/blob/43426eea344c626153efa46f3a9bc6b62d7e8a69/src/pip/_internal/models/search_scope.py#L52-L61
where the
has_tls()method checks where_sslmodule is available in Python or not.https://github.com/pypa/pip/blob/43426eea344c626153efa46f3a9bc6b62d7e8a69/src/pip/_internal/utils/compat.py#L77-L86
Can you try
import _sslto verify if thesslmodule is present in your python installation? I think that this error might not have to do with pip, but with the underlying python.There is also
IS_PYOPENSSLwhich tries to see ifpyopensslis available or not, but I couldn’t make much sense of how that is used.