I'm trying to install PIL as per its instruction on debian but can't figure how to fix this bit:

I get --- ZLIB (PNG/ZIP) support available on build_ext and * ZLIB (PNG/ZIP) support not installed on selftest

what am I missing?

root@portman:~/dist/Imaging-1.1.7# python setup.py build_ext -i
running build_ext
version       1.1.7
platform      linux2 2.7.2+ (default, Dec  1 2011, 01:55:02)
              [GCC 4.6.2]
*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
--- LITTLECMS support available
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.

To check the build, run the selftest.py script.
root@portman:~/dist/Imaging-1.1.7# python selftest.py
Python modules loaded from ./PIL
Binary modules loaded from ./PIL
--- PIL CORE support ok
*** TKINTER support not installed
--- JPEG support ok
*** ZLIB (PNG/ZIP) support not installed
--- FREETYPE2 support ok
--- LITTLECMS support ok
Running selftest:
--- 57 tests passed.

PIL is already packed for Debian in the python-imaging package: apt-get install python-imaging.

If you really want to install it manually, you maybe need to install the zlib1g-dev package.

| improve this answer | |
  • I did install it: root@portman:~/dist/Imaging-1.1.7# dpkg --get-selections|grep zlib1g-dev zlib1g-dev install – abolotnov Mar 7 '12 at 14:09
  • the reason I'm not installing via python-imaging is because I want to make sure I get all jpeg/zlib etc supported. – abolotnov Mar 7 '12 at 14:10
  • I though this could be because of libz.so being "lost" but that doesn't seem to be the case, too: root@portman:~/dist/Imaging-1.1.7# ldconfig -p|grep libz.so libz.so.1 (libc6) => /usr/lib/i386-linux-gnu/libz.so.1 libz.so (libc6) => /usr/lib/i386-linux-gnu/libz.so libz.so (libc6) => /usr/lib/libz.so – abolotnov Mar 7 '12 at 14:11
  • 1
    setup.py looks not at the right positions for the libraries. python-imaging (1.1.7-4) in Debian testing/sid contains a patch ( paste.debian.net/15886 ) which fixes the bug with disabled options (jpeg,zlib,...) – jofel Mar 7 '12 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.