It looks like you have a permission issue as you're trying to install PIL
globally.
To continue with this try (which will also upgrade PIL if you have it installed already):
sudo pip install -U PIL
If you want to experiment with PIL I recommend looking at using virtualenv. You create a virtual environment which you then activate
and can install dependencies into with pip
, without using sudo
.
For example:
# Change into home directory
cd ~/
# Make 'environments' folder and change into it
mkdir environments && cd $!
# Create virtual environment and change into it
virtualenv test_environment && cd $!
# Activate the environment
source bin/activate
# Install PIL
pip install PIL
This will create a contained environment to use PIL in and avoids using sudo
.
Note: you will have to activate
the environment every time you want to use any of the requirements though.