Stumbled across this error (OS X 10.5.8) , I fixed it by:
Remove the current PIL installation:
sudo rm -rf PIL
sudo rm PIL.pth
Remove the Images directory which you extracted to perform the installation (e.g. $HOME/Downloads/Imaging-1.1.7)
Now you need to ensure JPEG library is installed, I use mac ports:
sudo port install jpeg
Now extract your Imaging file and change directory into the new directory (Imaging-1.1.7):
sudo python setup.py install
then run it again!
python setup.py build_ext -i
now run the test:
My thanks go to a post by Simon Wilder’s blog which eased my frustration!