Reputation: 97
I'm trying to run a webapp/site on my machine, it's running on OSX 10.6.2 and I'm having some problems:
Caught an exeption while rending: The _imagingft C module is not installed
Doing import _imagingft in python gives me this:
>>> 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
It's seems that the Freetype library is the one having problems. No errors so far when installing PIL or when I compiled(?) the jpeg and freetype libraries so far.
I'm on django 1.1.1, python 2.6.2.
Upvotes: 6
Views: 4545
Reputation: 391
Before (re)installing PIL add the following sysmlinks to enable freetype on Mac 10.6 Snow Leopard:
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
Upvotes: 9
Reputation: 1090
I found the solution for this.
First you need to download Freetype2 http://freetype.sourceforge.net/index2.html and compile it with these instructions http://www.libgd.org/DOC_INSTALL_OSX#Building_freetype2 then you go and compile libjpeg and PIL http://fightingrabbits.com/archives/266
And that's it.
Upvotes: 2
Reputation: 4410
The environment is not set up correctly to build the OS X PIL\libjpeg binaries using easy_install. This guide should help http://fightingrabbits.com/archives/266 - It's for installing Python/Django but goes through the necessary PIL setup first and works for me on 10.6.x
Upvotes: 0
Reputation: 3377
I've had this problem as well. Couldn't resolve it with PIL 1.1.6 nor with PIL 1.1.7. I installed py26-pil from ports and presto, it works.
sudo port install py26-pil
If you don't have ports, go to http://www.macports.org/
Upvotes: 3
Reputation:
With errors like those it's usually because one of PIL dependencies were not compiled to be universal binary.
Try this:
But if you want to try compiling universal binary first, be my guest. My specific issue was actually with libjpeg, and no matter how I compiled it, PIL was barfing on import _imaging
. So I opted for packaged versions. I don't think libjpeg or freetype specifically benefit from compiling them yourself.
libjpeg8 package installs to /usr/local/lib
freetype package installs to your /Library/Frameworks folder.
Upvotes: 1