Fixing PIL IOError

I got pil installed (call sudo easy_install pil) on my debian system. After creating some tasks involving JPEGs I got this error:

IOError: decoder jpeg not available

I found a simple workaround to reinstall pil. Make sure you remove every source of PIL from your system.

Here is what I’ve done:

First, remove the old installation:

sudo rm -rf /usr/lib/python2.6/site-packages/PIL
    sudo rm /usr/lib/python2.6/site-packages/PIL.pth

Download sources again, extract and build them:

    tar xfv Imaging-1.1.7.tar.gz
    cd Imaging-1.1.7.tar.gz
    python build_ext -i

Run the included self test:


If everything is ok, install the package:

sudo python install
comments powered by Disqus