Last Updated: February 25, 2016
· davividal

IOError: decoder jpeg not available under Python Virtualenv

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/ /usr/lib

Now, (re)install pil and you're done!

pip uninstall pil
pip install pil

Thanks to