"'cc' failed with exit status 1" error when install python library "'cc' failed with exit status 1" error when install python library python python

"'cc' failed with exit status 1" error when install python library


Run these two lines in your shell before you build:

export CFLAGS=-Qunused-argumentsexport CPPFLAGS=-Qunused-arguments

Those exports tell the compiler to ignore unused arguments rather than complaining about them.


The reason seems to be that Python is compiling modules using the options that it was built with, except one of those options no longer works in mavericks:

the clang 3.4 Apple is shipping defaults to erroring on unknown flags, but CPython builds modules using the same set of flags it was compiled with originally.

(from: https://stackoverflow.com/a/22315129/65295)

Lots of people are running into this:


For me the issue was that I had just upgraded XCode and needed to install the command line tools (see this answer).

After running xcode-select --install my python library installed fine.


Installing with (inside of the program folder you pulled down)

sudo -E python setup.py install

did the job!