0

I have a problem uploading a picture in my Django Admin on OpenShift:

Exception Type:     IOError
Exception Value:    decoder jpeg not available

So I re-installed Pillow via pip install Pillow==2.8.2 -U --force-reinstall and the final summary shows:

--------------------------------------------------------------------
PIL SETUP SUMMARY
--------------------------------------------------------------------
version      Pillow 2.8.2
platform     linux2 2.7.8 (default, May 19 2015, 02:50:14)
             [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
--------------------------------------------------------------------
*** TKINTER support not available
--- JPEG support available
*** OPENJPEG (JPEG2000) support not available
--- ZLIB (PNG/ZIP) support available
--- LIBTIFF support available
--- FREETYPE2 support available
*** LITTLECMS2 support not available
*** WEBP support not available
*** WEBPMUX support not available
--------------------------------------------------------------------

So I guessed this would be fixed, but it isn't.. Do you have an idea ?

EDIT 1: the duplicate mentionned below proposes to install libjpeg-dev but this is not possible since yum is not available in OpenShift. Moreover I could list the following packages:

> ll /usr/lib*/libjpeg*
/usr/lib64/libjpeg.so -> libjpeg.so.62.0.0
/usr/lib64/libjpeg.so.62 -> libjpeg.so.62.0.0
/usr/lib64/libjpeg.so.62.0.0
/usr/lib/libjpeg.so.62 -> libjpeg.so.62.0.0
/usr/lib/libjpeg.so.62.0.0
> ll /usr/lib*/libfreetype*
/usr/lib64/libfreetype.so -> libfreetype.so.6.3.22
/usr/lib64/libfreetype.so.6 -> libfreetype.so.6.3.22
/usr/lib64/libfreetype.so.6.3.22
/usr/lib/libfreetype.so.6 -> libfreetype.so.6.3.22
/usr/lib/libfreetype.so.6.3.22

Is there something missing here?

EDIT 2: It may be due to missing /usr/lib/libjpeg.so (presence in /usr/lib64 is not enough) but again, ln -s /usr/lib/libjpeg.so.62 /usr/lib/libjpeg.so needs root support... How can I do?

Emmanuel
  • 13,935
  • 12
  • 50
  • 72
  • possible duplicate of [Decoder JPEG not available error when following Django photo app tutorial](http://stackoverflow.com/questions/12555831/decoder-jpeg-not-available-error-when-following-django-photo-app-tutorial) – Brandon Taylor Sep 13 '15 at 02:36
  • 1
    No it's not a duplicate - yum access is not available in OpenShift. – Emmanuel Sep 13 '15 at 17:50

1 Answers1

0

Ok, found: I had a version of PIL previously installed, my problem disappeared when I uninstalled PIL and left Pillow alone...

Emmanuel
  • 13,935
  • 12
  • 50
  • 72