About the Pil Error -- Ioerror: Decoder Zip Not Available

About the PIL Error -- IOError: decoder zip not available

It likely only needs the zip decoder to save the jpeg. I think I needed to follow these steps in OS X to preview jpegs.

It probably means you need to:

  • Download the PIL source.
  • Download the zlib library.
  • Point the PIL source to the zlib library.
  • Build PIL.

IOError decoder zip not available

I found two solutions for this that worked for me.

The first way that worked for me was to use a different imaging library all together. I installed pgmagic and that worked fine.

  sudo apt-get install libgraphicsmagick++-dev
sudo apt-get install libboost-python1.40-dev

There is also other imaging libraries available and they are all listed in the sorl-thumbnail docs:

http://sorl-thumbnail.readthedocs.org/en/latest/requirements.html

The second way that worked for me (preferred) was literally a fresh install of everything where I removed both pillow and PIL and the re-installed them starting with pillow.

pip uninstall pillow
pip uninstall PIL

pip install pillow
pip install PIL

IOError: decoder zip not available using matplotlib PNG in ReportLab on Linux, works on Windows

Apparently PIL setup.py doesn't know how to find libz.so. PIL expects libz.so to be located in /usr/lib not /usr/lib/i386-linux-gnu/libz.so.

To fix the problem

1) Find the location of your systems libz.so using find . -name libz.so.

2) Create a soft link from libz.so to /usr/lib using sudo ln -s /usr/lib/i386-linux-gnu/libz.so /usr/lib.

3) And as @Larry suggested you had to reinstall PIL after sym-linking the so for zlib.

To solve this problem for 64-bit system take a look here http://www.foxhop.net/ubuntu-python-easy_install-pil-does-not-install-zlib-support

PIL IOError: decoder zip not available after built with ZLIB support

I've fixed this by downloading the zlib source, building it and pointing the Image build to that.



Related Topics



Leave a reply



Submit