Man this has been an error that has been getting me down lately.
I have done tons of google searches for c _imaging not installed, PIL, libjpeg, Snow Leopard _jpeg_resync_to_restart and I have finally documented all my steps to rectify this issue.
If you don’t have this download it first.
go into your shell environment and untar by running the following
tar -zxvf jpegsrc.v7.tar.gz
./configuresudo make clean
sudo CC=”gcc -arch i386″./configure –enable-shared –enable-static
sudo make install
Next get PIL and untar it
tar -zxvf Imaging-1.1.6.tar.gz
If you already have PIL I would recommend running
sudo rm -Rf build
to clean any existing builds, this has caused me loads of errors and gray hairs!
in your setup.py file run find JPEG_ROOT
amend it so it looks as follows
JPEG_ROOT = libinclude(“/usr/local”)
Next move onto the build
sudo python setup.py build
if libjpeg is successfully installed you should be able to run python selftest.py without any errors relating to “jpeg”
sudo python setup.py install
if all has worked successfully you should be able to enter your python interpreter by executing python in your command line and also do the following:
without any errors.
Just to triple check I have a simple jpeg on my desktop.
image = Image.open(“/Users/MyName/Desktop/myimage.jpeg”)
should work without errors