Mac OS X: decoder jpeg not available

By Nuno Mariz, on 26 January 2007 @ 12:07
If you are using PIL(Python Imaging Library) on Mac OS X(Tiger), you will probably have a "decoder jpeg not available" when resizing a jpeg image.
This probably means that PIL doesn't have JPEG support, because libjpeg wasn't found when PIL was being configured.
Here is the solution:
  • Download, compile and install jpeglib and zlib
  • Edit PIL and change to:
    JPEG_ROOT = "/usr/local/include"
    ZLIB_ROOT = "/usr/local/include"
  • Compile:
    python build_ext -i
  • Test:
  • If the result is something like this:
    "57 tests passed."
  • You are ready to go:
    python install


  • #1 By Scot Hacker on 28 November 2009 @ 06:13
    Thank you! This worked when nothing else did. sorl-thumbnail finally working.
  • #2 By Bastien on 26 January 2010 @ 06:27
    Thank you! Although this post is fairly old, it did work for me too when nothing else was working!
  • #3 By Adam on 5 August 2010 @ 19:56
    Thanks! Exactly what I needed.
  • #4 By eltardo on 21 December 2010 @ 14:22
    Hi, with Snow Leopard I keep on getting "Got: decoder jpeg not available" error while trying the selftest.
    I compiled and installed the jpeglib and edited the PIL accordingly, but still having no success.
    Can anyone help me? This thing is very annoying...
Comments are closed.