Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing Pillow on ubuntu 14.04

I'm trying to install Pillow on Ubuntu 14.04 using this command:

pip install Pillow

but the installation fails with this error:

ValueError: --enable-jpeg requested but jpeg not found, aborting.
like image 736
Navid777 Avatar asked Oct 05 '15 06:10

Navid777


People also ask

How do I install pillow on Ubuntu?

According to Wikipedia Pillow is packaged as python-pil and python3-pil in Ubuntu 13.04 and later. To install the Python Imaging Library in Ubuntu 16.04 and later (and also in Ubuntu 14.04), open the terminal and type: sudo apt install python-pil # for python 2.X

Does pillow table support Ubuntu 16 LTS?

Bookmark this question. Show activity on this post. I went to This site for installing Pillow since the original PIL is a discontinued project and so now not so good to use. But, in the table support for Ubuntu 16.04 LTS is unmentioned. It appears neither in the 4.2.x installation guide, or in the 3.0.0 installation guide.

What version of Python does pillow support?

(There is support for Python 2.) Show activity on this post. According to Wikipedia Pillow is packaged as python-pil and python3-pil in Ubuntu 13.04 and later. and/or...


3 Answers

The problem was that the package libjpeg-dev was not installed. To solve the problem you should do this:

sudo apt-get install libjpeg-dev
like image 182
Navid777 Avatar answered Oct 08 '22 04:10

Navid777


Make sure Python-development packages are installed, if not then install it using the following commands :

For Ubuntu

sudo apt-get install python3-dev python3-setuptools

For Fedora

sudo dnf install python-devel

After installing the development packages install the following :

For Ubuntu

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

For Fedora

sudo dnf install libtiff-devel libjpeg-devel libzip-devel freetype-devel \
lcms2-devel libwebp-devel tcl-devel tk-devel
like image 32
Mahendra Yadav Avatar answered Oct 08 '22 05:10

Mahendra Yadav


You have to install the missing dependencies and libraries that Pillow requires for it to work. Find the dependencies here

This are the current dependancies/libraries for Ubuntu 14.04 for Pilllow 3.0.0+. Install them by running the command below

sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
like image 42
waweru Avatar answered Oct 08 '22 03:10

waweru