On Mac OSX 10.10.1 I get command not found for anything installed in /usr/local/bin (however command is found if I use sudo) PATH variable contains this path. for example pip. Here are some lines from terminal:

Dylans-MacBook-Air:edX Dylan$ echo $PATH/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin  
Dylans-MacBook-Air:edX Dylan$ ls /usr/local/bin  
2to3            idle3.4         pydoc3          python3.4-32        rtmpdump        tclsh8.5        wish8.5
2to3-3.4        pip         pydoc3.4        python3.4-config    rtmpgw          tclsh8.6        wish8.6
easy_install        pip2            python3         python3.4m      rtmpsrv         tclvfse         youtube-dl
easy_install-2.7    pip2.7          python3-32      python3.4m-config   rtmpsuck        teacup
easy_install-3.4    pip3            python3-config      pyvenv          tclselect       udemy-dl
idle3           pip3.4          python3.4       pyvenv-3.4      tclsh           wish
Dylans-MacBook-Air:edX Dylan$ pip
-bash: pip: command not found
Dylans-MacBook-Air:edX Dylan$ which pip
Dylans-MacBook-Air:edX Dylan$ sudo which pip
Dylans-MacBook-Air:edX Dylan$ 

What could be causing this behaviour and how do I fix it?

  • 1
    What are the permissions for /usr/local/bin/pip ? Maybe execution is only allowed to root. Commented Feb 4, 2015 at 14:27
  • Can you run other commands in /usr/local/bin? Is pip a symlink? Could you add the output of ls -l /usr/local/bin/pip?
    – jaume
    Commented Feb 4, 2015 at 15:16

1 Answer 1


The fix I ended up was removing all home brew Python and fixing up the system Python.

brew remove python
brew remove python3
brew cleanup

Check for the system pip and python (or absence of pip is OK too).

which python
which pip
which pip3
which python3

At this point, you need to easy_install a system based pip:

sudo easy_install --upgrade pip
pip --version

You should now have a pip that's based on /Library/Python (and pip 7.1.2 against python 2.7 for El Capitan in October 2015)

mac:~ me$ pip --version
pip 7.1.2 from /Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg (python 2.7)
mac:~ me$ which pip
mac:~ me$ which python

You must log in to answer this question.

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