Installing Pillow under Ubuntu & virtualenv is pretty simple. It's just:
pip install Pillow
However, getting the support for the image formats might take some guess work. The following takes that guess work out for you. Install the library listed with apt-get install to get the needed support for the image format.
- TKINTER - tk8.6-dev tcl8.6-dev python-tk
- JPEG - libjpeg-dev
- OPENJPEG - (See http://shortrecipes.blogspot.com/2014/06/python-34-and-pillow-24-with-jpeg2000.html)
- ZLIB (PNG/ZIP) - libpnglite-dev
- LIBTIFF - libtiff5-dev
- FREETYPE2 - libfreetype6-dev
- LITTLECMS - liblcms2-dev
- WEBP - libwebp-dev
- WEBPMUX - libwebp-dev
For your convenience, here's the command to install these libraries in one command line:
sudo apt-get install tk8.6-dev tcl8.6-dev python-tk libjpeg-dev libpnglite-dev libtiff5-dev libfreetype6-dev liblcms2-dev libwebp-dev libwebp-dev
Reference: http://pillow.readthedocs.org/en/latest/installation.html
Install Pillow after the above libraries are in place.
Note: this was tested for Ubuntu 14.04 (Trusty)