If you do pip install ~~
, you may get a warning like "** It is recommended to update pip **" as shown below.
error_message1
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Therefore, I updated pip with the command pip install -U pip
(Reference).
Then, the following TLS / SSL error will appear.
error_message2
umi-mori$ pip install -U pip
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
Requirement already up-to-date: pip in /Users/masumimorishige/.pyenv/versions/3.6.5/lib/python3.6/site-packages (19.3.1)
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
This error is an authentication error when connecting to a traditional network. Reinstall ʻopenssl` and Create pip.conf Although it has been raised, there are many cases where it does not heal, so here we will introduce a "temporary solution".
get-pip.py
The cause of the problem here is that you are trying to fetch pip from the internet.
Therefore, first download get-pip.py
from [this link].
You can hit the command curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
, but you may get an error, so in that case code from your browser Please get the python file directly.
get-pip.py
Running python3 get-pip.py
will start the pip installation.
Recommended Posts