Question

I'm trying to get up and running with sorl thumbnail but I'm getting an error "decoder zip not available".

I have read through a ton of similar pages saying that it is a PIL / Pilow issue.

I have tried re-installing pil via:

easy_install http://dist.plone.org/thirdparty/PIL-1.1.7.tar.gz

As well as:

pip uninstall PIL Pillow
pip install Pillow
pip install PIL

I read that Ubuntu uses a directory called /lib/x86_64-linux-gnu for x64 architectures. If you are using that architecture you need to create a symbolic link for that as well as for other shared libraries.

$ sudo ln -s /lib/x86_64-linux-gnu/libz.so.1 /lib/libz.so

Additional info:

OS: Ubuntu Precice

I have not tried installing the package zlib from source which some others have also mentioned worked for them.

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top