Changed the PATH to have /usr/local/bin ahead of /usr/bin and now pip isn’t found

bashhomebrewpathpythonterminal

I was following this guide to get Python 3 setup, which recommended changing the PATH variable such that "# If you still see 2.7 ensure in PATH /usr/local/bin/ takes pecedence over /usr/bin/". I put the following in my .profile:

export PATH="/usr/local/bin:$PATH"

This sets my PATH to /usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

This fixed my python --version issue, but now when I type pip --version I get

-bash: pip: command not found

in my terminal.

Can anyone please help?!

PS: I'm running Mac OS X High Sierra 10.13.3

Best Answer

Ok... so after a bit more digging I think I found the answer to my own question. While running pip --version doesn't work, running pip3 --version gives me pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6).

What I think is happening is that pip is located in the same location as python2 that comes with the Mac OS, while pip3 sits in the homebrew location.

Related Question