Error when install Pillow using PIP


I get this error

Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/Pillow/';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-VTDoyg-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/Pillow Storing debug log for failure in /root/.pip/pip.log

How to resolve?

asked 2 years, 3 months ago
Reputation: 1

1 Answer


It seems that importing setuptools has a problem.


$ 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

This will work for both python 2.x and python 3.x. You might not need all of these, but at the very least you should install libjpeg8-dev and zlib1g-dev for JPEG and PNG support.

Detailed instructions can be found at official pillow documentation.

answered 2 years, 3 months ago
Reputation: 1

Your Answer

Nothing to preview

Post Answer

Asked:  2 years, 3 months ago
Viewed:  1566 times
Active:  2 years, 3 months ago