我试图在Snow Leopard上安装PIL,使用Python 2.6.1,GCC 4.2.1,PIL 1.1.7,并尝试使用libjpeg6b和libjpeg7 - 没有任何东西作品。我已经从fink中清除了libjpeg/pil/zlib的所有踪迹,尝试了各种编译器选项等,并且使用了http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/和http:// www.brambraakman.com/blog/comments/installing_pil_in_snow_leopard_jpeg_resync_to_restart_error/(不是链接,因为仅适用于StOv让我发布一个......)在雪豹上安装PIL - 没有作品
4的潜在有用的信息位:
OTOOL不显示的libjpeg作为一个依赖
otool -L /Library/Python/2.6/site-packages/PIL/_imaging.so
/Library/Python/2.6/site-packages/PIL/_imaging.so:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)
我得到这些奇怪的编译器消息
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused because linking not done
i686-apple-darwin10-gcc-4.2.1: Tcl: linker input file unused because linking not done
i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused because linking not done
i686-apple-darwin10-gcc-4.2.1: Tk: linker input file unused because linking not done
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -I/System/Library/Frameworks/Tcl.framework/Headers -I/System/Library/Frameworks/Tk.framework/Headers -IlibImaging -I/sw/include/freetype2 -I/sw/include -I/opt/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include -I/usr/local/include -I/usr/include -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c Tk/tkImaging.c -o build/temp.macosx-10.6-universal-2.6/Tk/tkImaging.o -framework Tcl -framework Tk
In file included from /System/Library/Frameworks/Tk.framework/Headers/tk.h:78,
from Tk/tkImaging.c:51:
selftest.py失败,因为_imagingmath的(我用上面给出的第二个链接,之前太失败了,由于_imaging后)
Themistocles:Imaging-1.1.7 me$ python selftest.py
Traceback (most recent call last):
File "selftest.py", line 11, in <module>
from PIL import ImageMath
File "./PIL/ImageMath.py", line 19, in <module>
import _imagingmath
ImportError: No module named _imagingmath
只要不是selftest.py失败,因为_imaging
>>> import _imaging
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Library/Python/2.6/site-packages/PIL/_imaging.so, 2): Symbol not found: _jpeg_resync_to_restart
Referenced from: /Library/Python/2.6/site-packages/PIL/_imaging.so
Expected in: flat namespace
in /Library/Python/2.6/site-packages/PIL/_imaging.so
的
请帮助!这太荒谬了。我甚至很乐意能够在这一点上编译PIL sans jpeg支持!
我应该删除我已经安装了的libjpeg/PIL的副本? – 2010-07-11 21:23:40
暂停,macports是否想要安装它自己的Python,还是将它与系统之间的良好? – 2010-07-11 21:25:12
当我运行它时,我已经安装了较新的python,所以我不完全确定。它可能需要重新安装一些fink已有的东西,我从来没有联合使用过这两个。 – eruciform 2010-07-11 21:32:26