[Image-SIG] Minor problem building PIL on x86_64 under virtualenv

Diego Schulz dschulz at gmail.com
Sun Apr 17 07:19:26 CEST 2011


Hi all,

Please excuse me if this is not the apropriate list to discuss this.
I was trying to build PIL in a virtual environment with pip, and after
installing all the required packages (runtime and devel) in the host system,
setup.py was still unable to detect the libraries.
I'm working on Ubuntu 11.04 (not released yet), amd64. After some
experimentation I realized that setup.py was looking in standard places (ie
/usr/lib) and that works just fine with x86, but in x86_64 it really needs
to look in '/usr/lib/x86_64-linux-gnu' since there's where the lib files are
to be found.

TL;DR
Having problems building PIL in a virtual env with pip (Ubuntu 11.04 amd64),
just added a line to setup.py and it works now.

----------------------------------------------------------------
...
        # standard locations
        add_directory(library_dirs, "/usr/local/lib")
        add_directory(include_dirs, "/usr/local/include")

        add_directory(library_dirs, "/usr/lib/x86_64-linux-gnu")     #####
<<<--- ADDED THIS

        add_directory(library_dirs, "/usr/lib")
        add_directory(include_dirs, "/usr/include")
...
...
----------------------------------------------------------------

I'm not sure if this is a general solution for x86_64 systems other than
Debian-based ones, but it will surely can save some time to the next random
guy who tries what I'm up to.

cheers,

diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20110417/b7e2c6c9/attachment.html>


More information about the Image-SIG mailing list