← Back

Build PIL on Snow Leopard

I have had a right game trying to get the Python imaging library working on my machine. I kept getting Symbol not found: jpegresynctorestart when trying to import _imaging and in django I got the lovely error saying that the Imaging C library was not installed. It all pointed at libjpeg and seemed to be an architecture thing so I needed a universal version.

I tried the dmg file from http://ethan.tira-thompson.org/MacOSX_Ports.html and this too http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/

Granted I may have been able to get it to work if I had set the paths in the PIL setup.py file but I finally managed to get it running after installing libjpeg as universal from macports.

The simple way of doing this is:
sudo port install jpeg +universal

but you could add the +universal to the macports variants file. For more indepth and usful info about this see the page where I got the answers: http://rcaguilar.wordpress.com/2009/11/04/universal-binaries-in-macports/

EDIT 2013 - Probably easier to use Homebrew now I reckon.