Python Image Library IOError - cannot find JPEG decoder?

Dario Traverso traversos at gmail.com
Tue Feb 24 18:34:59 CET 2009


I've been trying to install the Python Image Library  (PIL) on my Mac  
OSX Leopard laptop, but have been running into some difficulties.

I've built the library, using the included setup.py  script. The build  
summary checks out ok, and sounds the option libraries to all be  
found. I grabbed both libjpeg and freetype2  using  fink.

--------------------------------------------------------------------
PIL 1.1.6 BUILD SUMMARY
--------------------------------------------------------------------
version       1.1.6
platform      darwin 2.5.1 (r251:54863, Jan 13 2009, 10:26:13)
              [GCC 4.0.1 (Apple Inc. build 5465)]
--------------------------------------------------------------------
--- TKINTER support ok
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok
--------------------------------------------------------------------

However,  I then run the included self test, and 1 out of 57 tests  
fails. I receive an IOError. Specifically:

*****************************************************************
Failure in example: _info(Image.open("Images/lena.jpg"))
from line #24 of selftest.testimage
Exception raised:
Traceback (most recent call last):
  File "./doctest.py", line 499, in _run_examples_inner
    exec compile(source, "<string>", "single") in globs
  File "<string>", line 1, in <module>
  File "./selftest.py", line 22, in _info
    im.load()
  File "PIL/ImageFile.py", line 180, in load
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
  File "PIL/Image.py", line 375, in _getdecoder
    raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available
1 items had failures:
   1 of  57 in selftest.testimage
***Test Failed*** 1 failures.
*** 1 tests of 57 failed.


I've followed all of the installation instructions exactly. The build  
summary reported everything was "ok". What could be the problem here.   
Libjpeg-6b  is not accessible?

Thank you for any insight you can provide!!

-Dario



More information about the Python-list mailing list