[Image-SIG] PIL can't find the native libs on AMD64 (patch included)

Lino Mastrodomenico l.mastrodomenico at gmail.com
Thu Feb 28 19:49:14 CET 2008

Hi everyone,

on my GNU/Linux AMD64 system, setup.py from PIL 1.1.6 doesn't find the
native libraries for Tkinter, JPEG, ZLIB and Freetype2 support, unless
I also install the 32-bit version of the libraries (I have a 64-bit
Python 2.4.3).

This patch seems to fix the problem for me, but I'm not sure it's
always the correct one:

--- setup.py.orig       2006-12-03 12:37:29.000000000 +0100
+++ setup.py    2008-02-28 19:20:46.000000000 +0100
@@ -199,6 +199,9 @@
         add_directory(library_dirs, "/usr/lib")
         add_directory(include_dirs, "/usr/include")

+        if sys.arch == "x86_64":
+            library_dirs = [s.replace("/lib", "/lib64") for s in library_dirs]
         # insert new dirs *before* default libs, to avoid conflicts
         # between Python PYD stub libs and real libraries

Lino Mastrodomenico
E-mail: l.mastrodomenico at gmail.com

More information about the Image-SIG mailing list