Try
sudo pip install -U setuptools
If this doesn't solve your problem then
Firstly, you need the python-dev package because Pillow needs compile headers defined.
sudo apt-get install python-dev
On Ubuntu 14.04 you need few extra packages to get pillow working. Install all of them with the command:
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…