Installing PIL in a virtualenv on Ubuntu 12.04

http://www.sandersnewmedia.com/why/2012/04/16/installing-pil-virtualenv-ubuntu-1204-precise-pangolin/
APR 16, 2012

The following technique should work for both 32-bit and 64-bit systems.

Install the build dependencies:
sudo apt-get build-dep python-imaging

Symlink the libraries:
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/

Install:
pip install PIL

You should see something like this after it builds:

PIL 1.1.7 SETUP SUMMARY

version 1.1.7
platform linux2 2.7.3 (default, Apr 10 2012, 22:21:37)

[GCC 4.6.3]

— TKINTER support available
— JPEG support available
— ZLIB (PNG/ZIP) support available
— FREETYPE2 support available

*** LITTLECMS support not available

This technique based on 64-bit instructions for Natty Narwhal