Since the comments thread has gotten too long, I'm going to type the rest of the answer here. First, try adding /usr/local/bin
to your PATH before /usr/bin
. As the error message above indicates, doing this allows your system to call the programs installed by homebrew before the system-provided ones. For example, if you install Python via brew python
, but don't change the PATH, your system will look first in /usr/bin
, see Python there, and won't look any further. It'll miss the version you installed in /usr/local/bin
with homebrew.
Changing your PATH on Mac OS X is a little different than on other systems. There's a good answer here at Superuser on changing the PATH in Mac OS X. Look in the files mentioned in the linked question's top answer (/etc/profile
, ~/.bash_profile
, ~/.bash_login
, ~/.profile
) to find where your PATH variable is defined, and move /usr/local/bin
before /usr/bin
. For example, if your ~/.bash_profile
has a line that looks like this:
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/local/bin
You'll want to change it to move /usr/local/bin
before /usr/bin
, like so:
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin
Setting and changing the PATH is less about programming than it is about Mac OS X system administration, thus falling out of the scope of Stack Overflow. If you run into problems, or are still confused, I'd recommend asking a question on http://apple.stackexchange.com. There are a lot of very experienced Apple users there who are familiar with system administration in Mac OS X.