Pillow=1.7.8 not installing creating a problem

tclap1006@tclap1006-Lenovo-G50-70:~/Desktop/myplone$ bin/buildout
Installing instance.
Getting distribution for 'Pillow==1.7.8'.
warning: no previously-included files found matching '.hgignore'
warning: no previously-included files found matching '.hgtags'
warning: no previously-included files found matching 'BUILDME.bat'
warning: no previously-included files found matching 'make-manifest.py'
warning: no previously-included files found matching 'SHIP'
warning: no previously-included files found matching 'SHIP.bat'
warning: no previously-included files matching '*' found under directory 'Tests'
_imaging.c:3017:5: warning: initialization from incompatible pointer type [enabled by default]
(inquiry) image_length, /sq_length/
_imaging.c:3017:5: warning: (near initialization for ‘image_as_sequence.sq_length’) [enabled by default]
_imaging.c:3077:5: warning: initialization from incompatible pointer type [enabled by default]
(inquiry) NULL, /mp_length/
_imaging.c:3077:5: warning: (near initialization for ‘pixel_access_as_mapping.mp_length’) [enabled by default]
libImaging/Quant.c: In function ‘rehash_collide’:
libImaging/Quant.c:154:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
*valp=(void )(((int )valp)+((int *)&newval));
_imagingft.c:73:31: fatal error: freetype/fterrors.h: No such file or directory
#include <freetype/fterrors.h>
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
An error occurred when trying to install Pillow 1.7.8. Look above this message for any errors that were output by easy_install.
Installing instance.
Getting distribution for 'Pillow==1.7.8'.
Error: Couldn't install: Pillow 1.7.8

here the instance script is not creating in the Bin directory because the pillow creating problem...please tell me the solution of it.
im following the professional plone 4 development book .


freetype-dev or freetype-devel

packages are not installed (as it is documented in every Plone documentation).


You may have a broken freetype installation where parts are installed and parts missing. So, Pillow is detecting some parts and assuming it may build freetype. In that case, it's something you'll have to fix, probably by reinstalling freetype-dev.

Or ... it may be that the Pillow build is detecting freetype and assuming it can build with it -- even though the freetype dev kit is not installed. In that case, I'd say it's a bug in the Pillow install. File an issue at https://github.com/python-pillow/Pillow/issues. The Pillow packaging team is generally very responsive.

give me the link of that plone documnetation where freetype-dev or freetype-devel is mentioned. @zopyx

You are right, the documentation is missing this information.


thanks a lot for sharing ur knowledge @do3cc

Neither freetype nor freetype-dev are required to build Pillow, and they add no functionality to Plone.

I have confirmed this with successful builds on all recent debian/ubuntu/centos versions.

If freetype-dev was needed on @bhartirawatbr's system -- which was in an unknown state, with an old version of Pillow -- that is not a reason to update our install package recommendations.

1 Like

yes @smcmahon freetype-dev is not working i just checked out it. then what is the exact solution of my problem @smcmahon
i really fed-up with this problem.
also tell me the role of environment because i made environment as per the tutorials from sited but we are not using this in the project. i just run command bin/buildout
gcc required python.h to create instance script. but is doesnt found the python.h because our python.h is present in enviroment so how can i use this environment with the plone to create instance script

Thanks for making a test. I just checked the Pillow docs that did mention libfreetype as a dependency. I will remove the dependencies from the docs again

1 Like

What about trying the with a fresh/clean system?

Please before you change anything, check the docs repo, I revert that yesterday, there is currently no mention of that in the docs !

There is a PR, which we may want to close, that is all.

I think it is enough to ask any plone in docker user :slight_smile:

docker not docker .....

@bhartirawatbr, maybe I am not awake yet, but maybe you want to share with us some basic information:

  • which Operating System are you using ?

Did you checked: http://docs.plone.org/4 for Plone 4 or docs.plone.org for Plone 5 ?

ubuntu 14.04 LTS im using...yes i checked out plone4 and plone5 docs....

i tell u everthing in detail first i made virtual env.(but i dont know how we are using virtualenv in project)
then a make another folder in which i make a bootstrap.py and buildout.cfg.
then i run python.bootstrap.py file which results many directories like

then in bin folder buildout script created so i run
bin/buildout command

then finally when instance script is installing then pillow=1.7.8 creating problem
which i have mentioned above.

i also install the dependencies sudo apt-get install python-setuptools python-dev build-essential libssl-dev libxml2-dev libxslt1-dev libbz2-dev libjpeg62-dev

Tested on clean install of 14.04 LTS and had no problem:

[steve@lumpy ~]$ mkdir test
[steve@lumpy ~]$ cd test
[steve@lumpy test]$ ln ~/nobackup/work/Plone-4.3.7-UnifiedInstaller.tgz .
[steve@lumpy test]$ vagrant init ubuntu/trusty64
[steve@lumpy test]$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[steve@lumpy test]$ vagrant ssh
vagrant@vagrant-ubuntu-trusty-64:~$ sudo apt-get update && sudo apt-get install build-essential libz-dev libjpeg-dev python-dev libxslt-dev  libssl-dev
vagrant@vagrant-ubuntu-trusty-64:~$ tar xf /vagrant/Plone-4.3.7-UnifiedInstaller.tgz
vagrant@vagrant-ubuntu-trusty-64:~$ cd Plone-4.3.7-UnifiedInstaller/
vagrant@vagrant-ubuntu-trusty-64:~/Plone-4.3.7-UnifiedInstaller$ ./install.sh standalone --password=admin
Plone successfully installed at /home/vagrant/Plone

The Unified Installer uses a (much) more current version of Pillow, but I also tested with 1.7.8. No problem.

@bhartirawatbr: I believe you need to repair your OS package installs. This problem is isolated to your machine.

I usally use pip instead of bootstrap.py saving me lots of trouble in custom buildouts, try in your buildout directory:

# reset/rebuild your virtualenv
rm -r ./lib ./include ./local ./bin
virtualenv --clear .

# ensure you have recent pip etc.
./bin/pip install --upgrade pip setuptools zc.buildout

# then run buildout