I tried to install libosmesa-devel for my EulerOS. It required Python (2.x) pip to install some packages. I already had python3 installed; so, I installed python2. Then, I got stuck while trying to install pip using python2. The general instruction was to download get-pip.py and run the following command:
python2 get-pip.py
which generates the following error:
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(SSLError('_ssl.c:710: The handshake operation timed out',),)) - skipping
ERROR: Could not find a version that satisfies the requirement pip<21.0 (from versions: none)
ERROR: No matching distribution found for pip<21.0
For the first line of error - SSL certificate error, I tried two approaches:
./configure --with-ssl
; Did NOT work.I tried to use --index-url http://pypi.python.org/simple/ --trusted-host pypi.python.org --trusted-host files.pythonhosted.org
arguments to resolve the first error but it did not work.
For the first line of error -
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(SSLError('_ssl.c:710: The handshake operation timed out',),)) - skipping
Solution: Change https
to http
in the
--index-url http://pypi.python.org/simple/
So, run ==>
python2 get-pip.py --index-url http://pypi.python.org/simple/ --trusted-host pypi.python.org --trusted-host files.pythonhosted.org
But this did not solve the following errors -
ERROR: Could not find a version that satisfies the requirement pip<21.0 (from versions: none)
ERROR: No matching distribution found for pip<21.0
Solution: Download the following three files from the given links:
Put these files in the same folder as get-pip.py
and run the following command:
python2 get-pip.py "pip-20.3.4-py2.py3-none-any.whl" "setuptools-44.1.1-py2.py3-none-any.whl" "wheel-0.37.1-py2.py3-none-any.whl" --index-url http://pypi.python.org/simple/ --trusted-host pypi.python.org --trusted-host files.pythonhosted.org
This finally solved the problem!
Successfully installed pip-20.3.4 setuptools-44.1.1 wheel-0.37.1