python-imaging-libraryhomebrew

How to install PIL in system library using homebrew?


In a new SnowLeopard install, I'd like to use homebrew to install PIL. However the recipe installs PIL under cellar instead of in /Library/Python/2.6/site-packages. Is there a way to change the install directory?


Solution

  • Since there seems to be no "accepted" way of installing homebrew eggs into the system site-packages, here is what I ended up doing:

    % brew install pil
    % easy_install pip
    % pip install pil
    

    The homebrew install grabs and installs all of PIL's dependencies (especially jpeg). The later easy_install then uses them when compiling PIL for the system site-packages. Freetype support doesn't show up in the "easy-installed" version, but that's fine for my purposes.

    As my initial goal was to provide a simple way for a web designer to build a django development environment, having an unused homebrew PIL installed is not really a problem.

    Hope this helps someone. Still hoping there's a better answer out there.