[Image-SIG] IOError: decoder zip not available

Fredrik Lundh fredrik at pythonware.com
Sat Jan 8 02:54:19 CET 2011


Oh, I just noticed that your mail included the "SETUP SUMMARY" but not
the selftest summary.  Did you install the missing libraries after an
initial failed build?  It could be that distutils didn't rebuild the
necessary files for you...

For a quick sanity check, in your build directory, do:

$ ls -l build/*/libImaging/*.o

and check that the ZipEncode and ZipDecode object files aren't
suspiciously tiny compared to the rest of the modules (they're still
built if zip support is disabled, but are mostly empty in that case).

If this seems to be the case, or if you just want to be sure, nuke the
build directory and run setup again.  You can use build_ext -i to
build just the extensions in the current directory:

$ rm -rf build
$ python2.7 setup.py build_ext -i
$ python2.7
>>> import _imaging
>>> dir(_imaging)
... look for zip functions ... or do:
>>> [(k, v) for k, v in vars(_imaging).items() if k[0] == 'z']
[('zip_decoder', <built-in function zip_decoder>), ('zlib_version',
'1.2.3.3'), ('zip_encoder', <built-in function zip_encoder>)]

If your result matches the sample output above, run setup.py install
and make sure that the _imaging.so module installed under
site-packages matches the one that was built locally.

</F>

2011/1/8 Adam M. Johnson <adamj at captainweirdbeard.com>:
>  Thank you for the troubleshooting technique! I am still getting oriented
> with Python. Sadly, this did not reveal anything telling. I ran this command
> as root and as the user who will be running it. I ran from the Imaging build
> directory, from the directory in which the script is located and from the
> user's home directory. All came back with the same path to the library file:
>
> /usr/local/lib/python2.7/site-packages/PIL/_imaging.so
>
> This is what I would expect when things are working correctly.
>
> Is there anything else I can check?
>
> Thanks for your help.
> Adam
>
>
>
> On 1/7/2011 3:33 PM, Fredrik Lundh wrote:
>>
>> python -c "import _imaging; print _imaging.__file__"
>


More information about the Image-SIG mailing list