0

I have a windows 8 box with ActivePython 2.7 32-bit installed. I install PIL via:

pypm install pil

All works fine, but if i try to use 'save' functionality with 'png', like this:

import PIL.Image
PIL.Image.new( 'RGB', (100,100) ).save( 'file.png' )

I got an error:

File "C:\Users\Eye.DEV\AppData\Roaming\Python\Python27\site-packages\PIL\Image.py", line 401, in _getencoder
    raise IOError("encoder %s not available" % encoder_name)
IOError: encoder zip not available

This is strange, since import zlib works fine, so my ActivePython installation apparently has zip suport. Is it some bug and PIL is not intended to be used on Windows / installed as binary, or i'm doing something wrong?

Please note, that this behaviour is Windows-specific. All works fine under buntu/Debian or OSX.

grigoryvp
  • 40,413
  • 64
  • 174
  • 277
  • 1
    A similar question without answer but with a number of links to possible solutions: http://stackoverflow.com/questions/15258335/ioerror-decoder-zip-not-available-ubuntu-python-pil – Janne Karila Jun 07 '13 at 19:20
  • @JanneKarila Question you have mentioned is related to `linux` setup with multiple `python` installations. And i have a clean `Windows` box with single `ActivePython` installed - so all problems mentioned in other question can't be applied here :(. – grigoryvp Jun 07 '13 at 20:58

1 Answers1

1

The problem was that PIL is not maintained and is not compatible with pip/pypm etc. If pillow fork is used, all works just fine.

grigoryvp
  • 40,413
  • 64
  • 174
  • 277