if you aren't relying on virtualenv, you should be able to just install PIL using yum:
yum install python-pil
If you install PIL (probably using pip) into your virtualenv and it tells you that JPEG support is not available, the problem is likely that redhat installs a 64-bit version of libjpeg and the default PIL installer doesn't know where to find it - as noted in this forum post.
Correcting this is relatively easy, just head to the terminal and follow these steps:
# Download the latest version of PIL - 1.1.7 at the time of this post wget http://effbot.org/downloads/Imaging-1.1.7.tar.gz # Untar tar xvzf Imaging-1.1.7.tar.gz cd Imaging-1.1.7 # edit setup file vim setup.py
Find a line that says:
JPEG_ROOT = None
Change it to:
JPEG_ROOT = "/usr/lib64"
# save and quite vim, then install from inside the un-tar'd package pip install ./
That took care of it for me, adding JPEG support - now that it knows where to find the 64-bit JPEG library.
If the rest of your library support is also failing, you can change the rest of the paths in setup.py to point to lib64 as well:
TCL_ROOT = "/usr/lib64" JPEG_ROOT = "/usr/lib64" ZLIB_ROOT = "/usr/lib64" TIFF_ROOT = "/usr/lib64" FREETYPE_ROOT = "/usr/lib64" LCMS_ROOT = "/usr/lib64"