在 Mavericks 上安装 Pillow/PIL [英] Installing Pillow/PIL on Mavericks

查看:31
本文介绍了在 Mavericks 上安装 Pillow/PIL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试使用 pip/easy_install 安装 Pillow 时遇到一个奇怪的错误:

I'm getting a strange error when trying to install Pillow using pip/easy_install:

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/Cellar/freetype/2.5.3/include/freetype2 -I/private/var/folders/c_/r7sp373509jdb6_1xmmzvl9c0000gn/T/pip_build_tills13/Pillow/libImaging -I/System/Library/Frameworks/Python.framework/Versions/2.7/include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.9-intel-2.7/_imaging.o

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

我已经阅读了所有的符号链接答案,我已经安装了命令行工具,但似乎没有任何效果.我总是收到那个错误.

I've read all the symlink answers, I've installed commandline tools, nothing seems to be working. I always get that error.

推荐答案

我通过以下方式解决了这个问题.可能与今天的 Mavericks 命令行工具更新有关.在执行 pip install 之前尝试在终端中添加以下内容:

I solved that problem the following way. Propably has something to do with todays Mavericks commandline tools update. Try adding following to the terminal before executing pip install:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

这篇关于在 Mavericks 上安装 Pillow/PIL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆