When using PIL/Pillow under virtualenv, an IOError shows up.
To solve it under Ubuntu 12.10, install the development headers you're going to need/use:
sudo apt-get install libjpeg8-dev
Link the shared object to /usr/lib, so pip can find it:
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
Now, (re)install pil and you're done!
pip uninstall pil pip install pil