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

  • 1
    The default PATH of newer macOS systems already is /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin(check /etc/paths! and compare it with your current PATH: /usr/local/bin:/usr/local/bin:/usr/bin:... ). So export PATH="/usr/local/bin:$PATH" in your bash profile is not required! – klanomath Feb 25 '18 at 0:57

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.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .