【发布时间】:2014-05-28 18:14:02
【问题描述】:
我正在尝试同步我克隆的一个新项目。安装需求后,我注意到我需要安装 PIL 或 Pillow 才能让 syncdb 工作。
这是我运行pip install pillow时发生的事情:
clang: error: 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
error: command 'cc' failed with exit status 1
通过堆栈搜索后,我尝试执行以下命令:
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
sudo -E pip install pillow
最终得到:
In file included from _imagingtk.c:19:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
# include <X11/Xlib.h>
^
1 error generated.
error: command 'cc' failed with exit status 1
至少没有叮当声,但枕头仍然不起作用。我尝试了其他一些方法,包括忽略标志和诸如此类的东西,但它们似乎都没有让枕头在我的 virtualenv 中工作。知道我能做什么吗?我正在运行 Mavericks 10.9.2
【问题讨论】:
-
使用老式的 PIL 怎么样?
pip install pil -
您可能需要执行
apt-get build-dep python-imaging来安装所需的依赖项(在出现此错误的情况下,libx11-dev) -
@sk1p 他不能使用
apt-get,他在 OS X 上
标签: python django clang pip osx-mavericks