[Solved] Linux installation pillow error: ValueError: jpeg is required unless explicitly disabled using –disable-jpeg, aborting

linux installation pillow error:

ValueError: jpeg is required unless explicitly disabled using –disable-jpeg, aborting

After searching, I found the following two solutions:

One:

sudo yum install python-devel
sudo yum install zlib-devel
sudo yum install libjpeg-turbo-devel

two:

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

The first one I use, the following one may not support the linux version I use, just keep it as a spare. After execution, run pip install pillow again.

 

Official website solution: https://pillow.readthedocs.io/en/3.0.0/installation.html#linux-installation

Linux Installation

Note

Most major Linux distributions, including Fedora, Debian/Ubuntu and ArchLinux include Pillow in packages that previously contained PIL e.g. python-imaging. Please consider using native operating system packages first to avoid installation problems and/or missing library support later.

We do not provide binaries for Linux. If you didn’t build Python from source, make sure you have Python’s development libraries installed. In Debian or Ubuntu:

$ sudo apt-get install python-dev python-setuptools

Or for Python 3:

$ sudo apt-get install python3-dev python3-setuptools

In Fedora, the command is:

$ sudo yum install python-devel

Prerequisites are installed on Ubuntu 12.04 LTS or Raspian Wheezy 7.0 with:

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

Prerequisites are installed on Ubuntu 14.04 LTS with:

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

Prerequisites are installed on Fedora 20 with:

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


ValueError:–enable-zlib requested but zlib not found, aborting.

Run pip install pillow==3.1.1 under Ubuntu 14.04 and report an error, ValueError: –enable-zlib requested but zlib not found, aborting.

$ sudo apt-get build-dep python-imaging

$ sudo apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev

$ pip install Pillow==3.1.1


Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *