[Image-SIG] Installing libjpeg

Mark Twenhafel chollapete at gmail.com
Fri May 14 17:22:47 CEST 2010


Follow-up to yesterday's question.  Also, thanks to Fredrik Lundh for
off-list assistance.  At one point, I was momentarily speechless when I
turned from an email back to the documentation I was reading and noticed
that both were authored by the same, Mr. Lundh.  :-)

>From yesterday, I progressed to attempting to create an image object from
within the Python interpreter using the call
ImageTk.PhotoImage(file="filename.jpg").  This call threw an exception:
"IOError: decoder jpeg not available" at line 375 in _getdecoder;
specifically, "raise IOError("decoder %s not available" % decoder_name)" in

Mr Lundh offered this advice:
This usually indicates that you've ended up with multiple _imaging.so
binaries on the machine, and that the test and your script picks up
different ones.

Try adding

   print Image.core.__file__

to your script and make sure that the output is what you expect.

At this point, my working hypothesis is that I did not install libjpeg
correctly.  I'm working on OS X Tiger.  What I did was download
"jpegsrc.v8a.tar.gz"; double-click in my download window in Firefox to
untar; move the untarred "jpeg-8" folder to /Application; open Terminal and
cd'ed to /Applications/jpeg-8; finally, I ran "./configure", "make", and
"make install".

It could be--and I don't know--that this install procedure did not correctly
add libjpeg to my Python 2.6 installation or that I need to rebuild
site-packages/PIL/_imaging.so in order to link-in libjpeg.  Any direction
would be appreciated.


Mark T.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20100514/2993dd41/attachment.html>

More information about the Image-SIG mailing list