0

I getting following error when I am trying to run my python program which uses PIL.

Generate_Dot.py:14: RuntimeWarning: the frombuffer defaults may change in a future release; for portability, change the call to read:
  frombuffer(mode, size, data, 'raw', mode, 0, 1)
  img = Image.frombuffer('L', size, data)
Traceback (most recent call last):
  File "Generate_Dot.py", line 15, in <module>
    img.save('image.png')
  File "/home/kapil/python/lib/python2.7/site-packages/PIL-1.1.7-py2.7-linux-i686.egg/PIL/Image.py", line 1439, in save
    save_handler(self, fp, filename)
  File "/home/kapil/python/lib/python2.7/site-packages/PIL-1.1.7-py2.7-linux-i686.egg/PIL/PngImagePlugin.py", line 572, in _save
    ImageFile._save(im, _idat(fp, chunk), [("zip", (0,0)+im.size, 0, rawmode)])
  File "/home/kapil/python/lib/python2.7/site-packages/PIL-1.1.7-py2.7-linux-i686.egg/PIL/ImageFile.py", line 481, in _save
    e = Image._getencoder(im.mode, e, a, im.encoderconfig)
  File "/home/kapil/python/lib/python2.7/site-packages/PIL-1.1.7-py2.7-linux-i686.egg/PIL/Image.py", line 401, in _getencoder
    raise IOError("encoder %s not available" % encoder_name)
IOError: encoder zip not available
Makyen
  • 31,849
  • 12
  • 86
  • 121
Kapil
  • 817
  • 2
  • 13
  • 25
  • http://stackoverflow.com/q/3544155/645956 – grc Feb 05 '15 at 13:45
  • possible duplicate of ["IOError: decoder zip not available" : Ubuntu Python PIL](http://stackoverflow.com/questions/15258335/ioerror-decoder-zip-not-available-ubuntu-python-pil) – El Bert Feb 05 '15 at 13:46
  • the answer in the duplicate doesn't suit him because he doesn't have root access. – robert Feb 05 '15 at 13:49
  • I already read the above links and tried but no luck. :-( – Kapil Feb 05 '15 at 13:51

1 Answers1

0

cpython depends on various third party libraries being installed in your system. In this case 'zip' is required to perform some compression. I'm guessing in this case it would be one of gzip, compress, or zlib. You should be able to install these quite easily using yum, or apt-get.

robert
  • 4,612
  • 2
  • 29
  • 39