Why am I getting the error: command 'llvm-gcc-4.2' failed with exit status 1 Why am I getting the error: command 'llvm-gcc-4.2' failed with exit status 1 python python

Why am I getting the error: command 'llvm-gcc-4.2' failed with exit status 1


I had the exact same problem when I upgraded from OSX 10.6 to 10.7. If you upgrade to 10.7 from 10.6, your version of Python may go from 2.6 to 2.7 and a result you may need to re-install most of your python packages.

Here's what worked for me:

  1. Install the latest version of XCode from the App Store
  2. Inside XCode, go to Preferences -> Downloads -> Components
  3. download the Command Line Tools

That's all you need to do. Try to install again in a new shell. The command line tool installation will put llvm-gcc-4.2 into /usr/bin which should be in your default path. The installation also takes care of library paths and stuff that you don't really want to know about unless something breaks.

10.9 edit

If you're running 10.9 or higher, I think you might be able to run this from the command line instead to install the command line tools:

xcode-select --install

I haven't verified that this is an actual fix to the problem.


Sounds to me you ran into this issue. The thread shows a variety of solutions.

Hope that helps.