最新的pip 1.5和Xcode 5.1使得很难在virtualenv中安装PIL。 我搜索了各种解决方案,似乎我必须执行这两行:
export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"
pip install PIL --allow-external PIL --allow-unverified PIL
但是我仍然有例外,我不知道为什么。我的同事在另一台机器上没有问题。
我已经使用Commandline Tools安装了Python和最新的Xcode。也许后者已经腐败了?
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
答案 0 :(得分:0)
尝试将这些添加到您的.profile
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments