I have an ec2 instance and had Pillow 2.0 installed in my virtualenv initially. Somehow when I tried to upgrade it to Pillow 2.5, it failed with the following message. The e
You might need to install the python development headers.
sudo apt-get install build-dep python-imaging
Ubuntu 16.04 virtualenv
pip install pillow==2.9.0
I had the same headache too...
The solution was found after reading docs, that says:
Starting from version 3.0.0 Pillow needs libjpeg...
So try the previous one:
pip install pillow==2.9.0
(It works for python 2.6 and above)
Good Luck!
The new version 3.0 doesn't work, we need to install the 2.9.0 version which works with Django. Do this while inside the virtual environment:
pip install Pillow==2.9.0
This should work also in Ubuntu, I use Elementary OS.
Finally I have found the answer to this headache!
It turns out I have two flag settings in my .bashrc
:
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
The .bashrc was copied from my Macbook Pro and these two flags were required as a work around for XCODE. It seems that they will break in Linux.
After removing these two flags, pip install Pillow
works as expected.
Thanks everyone for the help.
On Fedora, installing rpm-build
solved it for me. Make sure you have python-devel
and libjpeg-devel
installed too.