我正在尝试同步我克隆的一个新项目。安装requirements后,我注意到我需要安装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
发布于 2015-12-29 16:53:58
我使用的是OS X El Capitan,这对我很有效。
pip install Pillow活动终端窗口。
sudo xcode-select --install,需要一些时间才能完成。
发布于 2014-05-29 03:13:12
您的Mac上安装了Homebrew吗?如果您这样做,Pillow文档建议您使用以下命令进行安装:
brew install libtiff libjpeg webp little-cms2有关更多详细信息,请参阅http://pillow.readthedocs.org/en/latest/installation.html#os-x-installation。
同样,如果你有Homebrew,你也可以看看homebrew-python,它为Pillow提供了一个brew公式。
https://stackoverflow.com/questions/23918955
复制相似问题