I got HomeBrew on my mac and managed to replace mac
with 1
python 2.7.5
because the recent Maverick update messed up my python and keep giving the error:1
python 2.7.6
error: command 'cc' failed with exit status 1
Replace mac python with Brew Python
Relatively straight forward with Brew. If you don’t have Homebrewm, just follow the instruction on the homepage:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew doctor
brew install python
Check your python version with
.1
python --version
It should give
python 2.7.6
If you are still getting
then make sure your path is correct. Check your 1
python 2.7.5
with 1
$PATH
. Since brew install packages in 1
echo $PATH
instead of systemwide 1
/usr/local/bin
, make sure that your 1
/usr/bin
starts with 1
$PATH
. Add this to your 1
/usr/local/bin
(or 1
~/.bash_profile
or 1
~/.profile
but stick with 1
~/.bashrc
if you don’t have the others):1
~/.bash_profile
# add custom, local installations to PATH
PATH=/usr/local/bin:"$PATH"
Then in the Terminal, source it
source ~/.bash_profile
Now recheck your python with
.1
python --version