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
How to Check If One Dictionary Is a Subset of Another Larger Dictionary
Opencv Python: Cv2.Findcontours - Valueerror: Too Many Values to Unpack
Python Imaging Library - Text Rendering
Building Lxml for Python 2.7 on Windows
Do You Use the "Global" Statement in Python
Importerror: No Module Named 'Django.Core.Urlresolvers'
How to Draw a Line with Matplotlib
Passing a Function to Re.Sub in Python
Ipython Notebook Clear Cell Output in Code
How Does Python Find a Module File If the Import Statement Only Contains the Filename
Shift Elements in a Numpy Array
How to Quickly Estimate the Distance Between Two (Latitude, Longitude) Points
Get Inserted Key Before Commit Session
How to Cycle Through Line Styles in Matplotlib
Convert Pandas Datetimeindex to Unix Time
How to Find Element by Part of Its Id Name in Selenium with Python