PIL missing JPEG support (only on newer ubuntu?)

2 views
Skip to first unread message

John Milner

unread,
Jun 21, 2012, 4:18:57 PM6/21/12
to student-worker-relational-database-dev
Oh noes:
    --------------------------------------------------------------------
    PIL 1.1.7 SETUP SUMMARY
    --------------------------------------------------------------------
    version       1.1.7
    platform      linux2 2.7.3 (default, Apr 20 2012, 22:39:59)
                  [GCC 4.6.3]
    --------------------------------------------------------------------
    *** TKINTER support not available
    *** JPEG support not available
    *** ZLIB (PNG/ZIP) support not available
    *** FREETYPE2 support not available
    *** LITTLECMS support not available
    --------------------------------------------------------------------

apt-get build-dep python-imaging
ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/
ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/
ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/
pip install pil

Yay.
    --------------------------------------------------------------------
    PIL 1.1.7 SETUP SUMMARY
    --------------------------------------------------------------------
    version       1.1.7
    platform      linux2 2.7.3 (default, Apr 20 2012, 22:39:59)
                  [GCC 4.6.3]
    --------------------------------------------------------------------
    --- TKINTER support available
    --- JPEG support available
    --- ZLIB (PNG/ZIP) support available
    --- FREETYPE2 support available
    *** LITTLECMS support not available
    --------------------------------------------------------------------


On Thu, Jun 21, 2012 at 3:32 PM, <donot...@cristoreyny.org> wrote:

Sentry New Event

1

IOError: decoder jpeg not available

http://sentry.cristoreyny.org/1/group/155/

Logger: root Level: error
Server: SWORDv2 First Seen: June 21, 2012
Stacktrace
Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "django/views/decorators/csrf.py", line 39, in wrapped_view
    resp = view_func(*args, **kwargs)

  File "django/views/decorators/csrf.py", line 52, in wrapped_view
    return view_func(*args, **kwargs)

  File "ckeditor/views.py", line 114, in upload
    create_thumbnail(upload_filename)

  File "ckeditor/views.py", line 56, in create_thumbnail
    imagefit = ImageOps.fit(image, THUMBNAIL_SIZE, Image.ANTIALIAS)

  File "PIL/ImageOps.py", line 329, in fit
    (leftSide, topSide, leftSide + cropWidth, topSide + cropHeight)

  File "PIL/Image.py", line 763, in crop
    self.load()

  File "PIL/ImageFile.py", line 189, in load
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)

  File "PIL/Image.py", line 385, in _getdecoder
    raise IOError("decoder %s not available" % decoder_name)
Http
URL: http://sis.cristoreytc.org/ckeditor/upload/
Method: POST
Query: 'CKEditor=id_questionanswers_new-2-answer&CKEditorFuncNum=162&langCode=en'

John Milner

unread,
Jul 2, 2012, 4:31:14 PM7/2/12
to student-worker-relational-database-dev
If you use Pillow instead of PIL (both were already installed), you don't have to do any symlinking, just:
apt-get install libfreetype6-dev libjpeg-dev
pip install --upgrade pillow

I uninstalled PIL to make sure Pillow actually gets used. This was done on the crey.org (NY) server.
Reply all
Reply to author
Forward
0 new messages