Question

The latest pip 1.5 and Xcode 5.1 have made it difficult to install PIL in an virtualenv. I have googled for various solutions and it seems I had to execute these two lines:

export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"
pip install PIL --allow-external PIL --allow-unverified PIL

However I am still getting an exception and I have no idea why. My colleague on a different machine has no problem with it.

I have installed Python and latest Xcode with Commandline Tools. Maybe the latter is corrupted?

clang: warning: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

clang: warning: argument unused during compilation: '-mno-fused-madd'

In file included from _imaging.c:75:

In file included from /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:19:

In file included from /usr/bin/../lib/clang/5.1/include/limits.h:38:

/usr/include/limits.h:63:10: fatal error: 'sys/cdefs.h' file not found

#include <sys/cdefs.h>

         ^

1 error generated.

error: command 'clang' failed with exit status 1
Was it helpful?

Solution

Try adding these to your .profile

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top