Reputation: 1
I´m getting the next error when I try to install pip on MacOS Mojave
I tried to solve it using
$ brew install python
but it doesn´t work
$ python --version
Python 3.7.4
$ sudo python get-pip.py
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting 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
Upvotes: 0
Views: 2344
Reputation: 411
It is likely that pip is already installed, if the Homebrew installation of python was successful.
The Hitchhiker's Guide to Python notes that when installing Python through Homebrew, "Homebrew [automatically] installs pip pointing to the Homebrew’d Python 3 for you."
Try running which pip
or which pip3
. If you get a response of /usr/local/bin/pip
or /usr/local/bin/pip3
, then Homebrew installed pip already for you. Else try brew unlink python3 && brew link python3
.
And for clarity, from the aformentioned guide:
$ python
will launch the Homebrew-installed Python 3 interpreter.
$ python2
will launch the Homebrew-installed Python 2 interpreter (if any).
$ python3
will launch the Homebrew-installed Python 3 interpreter.
As far as I know, pip
, pip2
, and pip3
will do the same.
Upvotes: 1