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 and this too

Granted I may have been able to get it to work if I had set the paths in the PIL 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:

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