Installing PIL in Mac OS

PIL(Python Imaging Library) is an image processing library for python.

In this post I will show you how to install PIL.


  1. Python should be already installed on the machine. To make sure, just type ‘python’ in terminal and see if its already there.
  2. Xcode should already be installed

I installed PIL using pip.

If you dont have pip, do the following. Open the terminal and type the following:

curl -O
tar xzf pip-0.7.2.tar.gz
cd pip-0.7.2
sudo /usr/bin/python install

This will install pip. Once pip is installed, you can install PIL by following steps.

First make sure you have lib jpeg install for JPEG handling. To do that,

curl -O
tar zxvf jpegsrc.v8c.tar.gz
cd  jpeg-8c/
sudo make install

Then install PIL using pip

sudo pip install PIL



  1. Python for Mac OS
  2. Python Imaging Library (PIL)