当我尝试建立PIL在Mac OS X 10.8.1山狮,我得到以下结果:如何在OS X Mountain Lion上构建PIL?
$ sudo python setup.py install
Password:
running install
running build
running build_py
running build_ext
--- using frameworks at /System/Library/Frameworks
building '_imaging' extension
clang -fno-strict-aliasing -fno-common -dynamic -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 -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/opt/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include -I/usr/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.8-intel-2.7/_imaging.o
clang: warning: argument unused during compilation: '-mno-fused-madd'
_imaging.c:75:10: fatal error: 'Python.h' file not found
#include "Python.h"
^
1 error generated.
error: command 'clang' failed with exit status 1
这是升级还是干净安装?我无法在干净的安装上重现。 – aclark
这是Lion的升级版本(我认为是10.7.4),它也将Python手动升级到2.7。由于Pillow在干净的安装上工作,我认为对我来说这是一个足够可接受的答案。感谢您检查这一点,并为您在枕头上的工作:) –