我正在尝试在我的机器上运行一个网络应用程序/网站,它在 OSX 10.6.2 上运行,但我遇到了一些问题:
Caught an exeption while rending: The _imagingft C module is not installed
在 python 中执行 import _imagingft 给我这个:
>>> import _imagingft
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Library/Python/2.6/site-packages/PIL/_imagingft.so,
2): Symbol not found: _FT_Done_Face
Referenced from: /Library/Python/2.6/site-packages/PIL/_imagingft.so
Expected in: flat namespace
in /Library/Python/2.6/site-packages/PIL/_imagingft.so
似乎是 Freetype 库有问题。到目前为止,安装 PIL 或编译(?)jpeg 和 freetype 库时没有错误。
我使用的是 django 1.1.1,python 2.6.2。
最佳答案
在(重新)安装 PIL 之前添加以下系统链接以在 Mac 10.6 Snow Leopard 上启用 freetype:
ln -s /usr/X11/include/freetype2 /usr/local/include/
ln -s /usr/X11/include/ft2build.h /usr/local/include/
ln -s /usr/X11/lib/libfreetype.6.dylib /usr/local/lib/
ln -s /usr/X11/lib/libfreetype.6.dylib /usr/local/lib/libfreetype.dylib
关于python - Django/PIL 错误 - 呈现 : The _imagingft C module is not installed 时捕获异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2478123/