Last active
August 29, 2015 14:05
-
-
Save machristie/01989953908e8937d02d to your computer and use it in GitHub Desktop.
Install Pillow on Mac OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ZLIB_ROOT = None | |
brew_zlib_home = os.path.join(os.environ["BREW_HOME"], "opt", "zlib") | |
ZLIB_ROOT = os.path.join(brew_zlib_home, "lib"), os.path.join(brew_zlib_home, "include") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To install Pillow, first need some dependencies installed using brew
I've already set the following environment variables, which I got from https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python
However, zlib is a "keg-only" formula. It isn't put into
BREW_HOME/lib
, etc. but insteadis put into
BREW_HOME/opt/zlib
. So we need to update the Pillow setup.py to be ableto find the lib and include directories.
Download the Pillow source zip file from pypi:
https://pypi.python.org/pypi/Pillow/2.5.1. Unzip it and edit setup.py. Change
line
to
Now you can run
To verify that everything works, you can also run