0

我有一个安装了 ActivePython 2.7 32 位的 Windows 8 机器。我通过以下方式安装 PIL:

pypm install pil

一切正常,但如果我尝试将“保存”功能与“png”一起使用,如下所示:

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

我收到一个错误:

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

这很奇怪,因为import zlib工作正常,所以我的 ActivePython 安装显然zip支持。它是一些错误并且PIL不打算在 Windows 上使用/作为二进制安装,还是我做错了什么?

请注意,此行为是特定于 Windows 的。在 buntu/Debian 或 OSX 下一切正常。

4

1 回答 1

1

问题PIL是没有维护并且与pip/pypm等不兼容。如果pillow使用 fork,一切正常。

于 2013-06-08T10:04:41.270 回答