Installing Pillow 2.4 (pip install -I pillow) simply results in "OPENJPEG (JPEG2000) support not available".
Thus, it is needed to compile the openjpeg library 2.0 from source. For this, first lets download the openjpeg 2.0.1:
wget http://downloads.sourceforge.net/project/openjpeg.mirror/2.0.1/openjpeg-2.0.1.tar.gz
tar xzvf openjpeg-2.0.1.tar.gz
cd openjpeg-2.0.1/
cmake .
make
sudo make install
Please note that we install version of openjpeg 2.0, rather than newer 2.1. Pillow wont recognize openjpeg 2.1 either.
Assuming everything went fine, we can reinstall Pillow:
pip install -I pillow
If openjpeg 2.0.1 was detected successfully, we should get the following info "OPENJPEG (JPEG2000) support available" among others.
Seems like the install process doesn't call ldconfig properly, so you need to call it after "make install".
ReplyDeleteSource: http://comments.gmane.org/gmane.comp.graphics.openjpeg/500
The first line of the instructions, (starting with http://downloads), is missing the command wget before the URL.
ReplyDeleteThx. I added missing wget call to the code.
ReplyDeleteI have this error after sudo make install
ReplyDeleteIn file included from /usr/include/png.h:536:0,
from /home/franco/workspace/portfolio/openjpeg-2.0.1/src/bin/jp2/convert.c:51:
/usr/include/zlib.h:1758:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Z_ARG’
ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file,
^
make[2]: *** [src/bin/jp2/CMakeFiles/opj_compress.dir/convert.c.o] Errore 1
make[1]: *** [src/bin/jp2/CMakeFiles/opj_compress.dir/all] Errore 2
make: *** [all] Errore 2