You should install the libraries that others recommended but most importantly you should tell PIL where to find them. Edit the setup.py so that
JPEG_ROOT = None
becomes
JPEG_ROOT = libinclude("/usr/lib")
I found that the easiest way was to download the source with pip but not install:
pip install --no-install PIL
edit the setup (inside the build directory of the virtual environment) and the install
pip install PIL
you can find some more information in my blog
You can also try pillow which seems to do great job with little hassle (pip install pillow)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…