Here's what I did on Ubuntu for future reference:
1. Download PIL source:
wget
http://download.zope.org/distribution/PILwoTk-1.1.6.4.tar.gz
2. Untar the source:
tar xzvf PILwoTk-1.1.6.4.tar.gz
3. On Ubuntu install lib jpeg dev:
sudo apt-get install libjpeg62-dev
4. Build PIL
cd Imaging-1.1.6.4
sudo python setup.py build_ext -f
Check for jpeg OK in build summary:
PIL 1.1.6 BUILD SUMMARY
version 1.1.6 platform linux2 2.5.2 (r252:60911, Apr 21 2008,
11:12:42)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]
*** TKINTER support not available --- JPEG support ok --- ZLIB (PNG/
ZIP) support ok *** FREETYPE2 support not available
5. Remove PIL from /usr/lib/python<version>/site-packages:
sudo rm -fr /usr/lib/python2.5/site-packages/PIL*
6. Re-install PIL
sudo python setup.py install
On Sep 18, 7:29 am, Rene Jochum <
r...@pc-dummy.net> wrote:
>
http://pkarl.com/blog/articles/38/freetype-jpeg-zlib-and-the-python-i...
> helped me installing PIL withJPEGsupport. on Mac OS-X 10.5 Leopard
>
> This Post is only a reference for other's who have the same problems
> on Mac OS-X
>
> On 11 Sep., 18:50, David Lindquist <
david.lindqu...@gmail.com> wrote:
>
> > I had this same problem, but with PNGs. My solution was to recompile
> > PIL with zLib support. Here is thread FWIW:
>
> >
http://groups.google.com/group/satchmo-users/browse_thread/thread/
> > 4ce9d54d392de367/3b27340e1e9697c7?hl=en&lnk=gst&q=pil
>
> > On Sep 11, 2008, at 9:43 AM, nostradamnit wrote:
>
> > > Unfortunately, that's not the problem, but I have at least figured out
> > > that, despite passing the tests, PIL still doesn't see thejpeg
> > >decoder, as the snippet below shows. Back to the PIL config goose
> > > chase...
>
> > >>>> import Image
> > >>>> img = Image.open('/home/sam/Documents/test_image.jpg').copy()
> > > Traceback (most recent call last):
> > > File "<stdin>", line 1, in <module>
> > > File "/usr/lib/python2.5/site-packages/PIL-1.1.6-py2.5-linux-
> > > i686.egg/Image.py", line 717, in copy
> > > self.load()
> > > File "/usr/lib/python2.5/site-packages/PIL-1.1.6-py2.5-linux-
> > > i686.egg/ImageFile.py", line 180, in load
> > > d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
> > > File "/usr/lib/python2.5/site-packages/PIL-1.1.6-py2.5-linux-
> > > i686.egg/Image.py", line 375, in _getdecoder
> > > raise IOError("decoder%s not available" % decoder_name)
> > > IOError:decoderjpegnot available