New python dependency - Pillow. If you get error during update, see this post

The new dependency Pillow is used to generate image thumbnails for shopping cart.


Command “/home/USER/frappe-bench/env/bin/python -c “import setuptools, tokenize;file=’/tmp/pip-build-ZOfqQL/Pillow/setup.py’;exec(compile(getattr(tokenize, ‘open’, open)(file).read().replace(’\r\n’, ‘\n’), file, ‘exec’))” install --record /tmp/pip-NAQ3qY-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/sam/frappe-bench/env/include/site/python2.7/Pillow” failed with error code 1 in /tmp/pip-build-ZOfqQL/Pillow

If you get this error, run these commands based on your OS:

CentOS:

sudo yum install libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel

Ubuntu 14.04+

sudo apt-get install -y libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk

Older Ubuntu

sudo apt-get install -y libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk

-Anand.

6 Likes

Debian Wheezy

sudo apt-get install -y libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk
1 Like

That was a big update :smile: .

If you are getting 404 errors on ubuntu while installing Pillow dependencies, try this help: http://ask.xmodulo.com/404-not-found-error-apt-get-update-ubuntu.html

Thanks @adityaduggal for the tip!

2 Likes

For OS X,

brew install libtiff libjpeg webp little-cms2

then

sudo pip install Pillow

Hi all,

I keep getting this error with debian 7:

$ sudo bash setup_frappe.sh --setup-production
Installing for debian 7 amd64
In case you encounter an error, you can post on https://discuss.frappe.io
Adding debian mariadb repo
Installing packages for debian. This might take time…
Reading package lists…
Building dependency tree…
Reading state information…
E: Unable to locate package tcl8.6-dev
E: Couldn’t find any package by regex ‘tcl8.6-dev’
E: Unable to locate package tk8.6-dev
E: Couldn’t find any package by regex ‘tk8.6-dev’

I added sudo apt-get install -y libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk

before installing / running bench
I am unable to find tk8.6-dev- any help would be greatly appreciated!

ERP v6 works fine in Ubuntu though.

Thanks!

sudo apt-get install tcl8.6-dev should work.
Both the Centos and Older Ubuntu solutions on this page ask for tcl8.5-dev
Why not modify your command to ask for ver tcl8.5-dev? and see what happens.
Also I would install Pillow and its dependencies before installing frappe.

Prior to Pillow/frappe installation have you:
$ sudo apt-get install python-dev python-setuptools
This may help.

The GitHub Pillow page provides more helpful info.

https://github.com/python-pillow/Pillow/blob/master/docs/installation.rst#installation

Good Luck

1 Like