IOError: decoder jpeg not available

by Rene Pijlman last modified Dec 30, 2008 03:08 PM
You've installed the Python Imaging Libraries (PIL). Yet when you upload or manipulate an image, you get the error message: IOError: decoder jpeg not available.

This probably means that PIL doesn't have JPEG support, because libjpeg wasn't found when PIL was being configured.

Suggestions

  • Doublecheck the configuration of PIL.
  • Change JPEG_ROOT in PIL's setup.py file to point to the directory where libjpeg is installed. See the comments in the file for details.
  • Check that your program is picking up the _imaging module that you've built, and not some older version:
$ python -vv -c "import _imaging"

If you are on Mac OS X, there is a document explaining how to get libjpeg installed properly here.