PIL or Python Imaging Library is a library that allows you to manipulate images in Python programming language, trying to install “PIL” using “pip” tool won’t work perfectly so here is how to proper installation.
Brew is a package management system that simplifies the installation of software on Mac OS X, you can install it easily with the following command:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Actually we will install “pillow” a fork of “pil”:
brew install samueljohn/python/pillow
Configure your Python Path
To make PIL available to Python we add its path to PYTHONPATH variable:
To test if you have PIL installed:
python -c "import PIL.Image"
You shouldn’t get any errors.