Installing pip on macOS Sierra
You just need to install pip
which is not automatically installed in macOS Sierra.
Run sudo easy_install pip
For Mac OS Sierra, cannot install pip via easy_install
since there is a problem with TLS Version, Installed Open-SSL version won't support TLS 1.2
So install pip using curl as follows,
curl https://bootstrap.pypa.io/get-pip.py | sudo python
OK gang, lots of these answers where helpful but none of them got me to the finish line. I am running High Sierra 10.13.4. The problem as documented above is that Brew installs pip in the /usr/local/bin
directory but Python is in /usr/bin
(although as Carl said, Python3 correctly goes to /usr/local/bin
).
My immediate use case is related to getting the Postgres BigSQL package to install.
The steps I took are as follows:
- Clear out the brew cache
$ rm -rf ~/Library/Caches/Homebrew
- Clear out the site-packages
$ sudo rm -rf /usr/local/lib/python2.7/site-packages
- Reinstall Python
$ brew reinstall python
This pulls downpython-3.5.6.high_sierra
and put it in/usr/local/bin/python3
- But
which python
still shows/usr/bin/python
- The solution is to run
brew install python@2
which pulls downpython@2-2.7.14_3.high_sierra
- Now
which python
shows the correct path/usr/local/bin/python
which is also where all your pip stuff is installed, so now pip will work. - Of course if you have not installed the latest version of pip you should do that too with
sudo pip install --upgrade pip