首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装Pillow错误

安装Pillow错误
EN

Stack Overflow用户
提问于 2014-05-29 02:14:02
回答 2查看 885关注 0票数 1

我正在尝试同步我克隆的一个新项目。安装requirements后,我注意到我需要安装PIL,或者Pillow,以便使syncdb工作。

下面是我运行pip install pillow时发生的情况

代码语言:javascript
复制
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

在搜索完堆栈之后,我尝试执行以下命令:

代码语言:javascript
复制
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
sudo -E pip install pillow

最终得到了:

代码语言:javascript
复制
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

EN

回答 2

Stack Overflow用户

发布于 2015-12-29 16:53:58

我使用的是OS X El Capitan,这对我很有效。

  1. 关闭pip install Pillow

活动终端窗口。

  • 打开新终端并运行sudo xcode-select --install,需要一些时间才能完成。

  • 完成后,打开新终端并运行virtualenv
票数 2
EN

Stack Overflow用户

发布于 2014-05-29 03:13:12

您的Mac上安装了Homebrew吗?如果您这样做,Pillow文档建议您使用以下命令进行安装:

代码语言:javascript
复制
brew install libtiff libjpeg webp little-cms2

有关更多详细信息,请参阅http://pillow.readthedocs.org/en/latest/installation.html#os-x-installation

同样,如果你有Homebrew,你也可以看看homebrew-python,它为Pillow提供了一个brew公式。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23918955

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档