Before someone says "sudo apt-get install libjpeg-dev" or something like that, I don't have sudo access. I am on a server slice that DOES NOT allow me access to sudo. Therefore, I have to do all this in my local directory. This is the only way to do this.
I need a python script to resize an image. It works fine for png files, but it falls apart on jpeg files with the error indicated in the header.
Here are the steps I have taken so far:
- We downloaded
libjpeg-dev and installed it in $HOME/jpegtest , so inside jpegtest / folder is lib /, include / etc. - I downloaded
Pillow manually and extracted it on $HOME/Pillow - I edited
setup.py fild to JPEG_ROOT on libinclude(<absolute path to jpegtest>) I built and compiled Pillow where it was installed on $HOME//.pythonbrew/pythons/Python-2.7.5/lib/python2.7/site-packages/Pillow-2.4.0-py2.7-linux-x86_64.egg . The important part of the output is as follows:
*** TKINTER support not available --- JPEG support available *** OPENJPEG (JPEG2000) support not available --- ZLIB (PNG/ZIP) support available *** LIBTIFF support not available *** FREETYPE2 support not available *** LITTLECMS2 support not available *** WEBP support not available *** WEBPMUX support not available
So, I would suggest that this means that JPEG support will work, but when I run my program, it says:
IOError: jpeg decoder not available
When typing, I also noticed that the question on Pillow was recognized by the JPEG encoder during installation, but was not using , which sounded very close to mine, so I tried the solution there
ln -s /media/sdl1/home/midnight/jpegtest/lib/libjpeg.so /media/sdl1/home/midnight/.pythonbrew/pythons/Python-2.7.5/lib
But I still have the same error.
I have been working on this issue for about two days now, and I'm not quite sure what to do. If someone can provide some help, it will be very helpful.
source share