Table of Contents
The installation instructions for Pillow on Linux give advice of how to install these packages. Note that not all of the following packages may be missing on your machine (comments suggest that only
libjpeg8-dev is actually missing).
pip / PyPi (Pillow>3.4.2)
The latest releases of Pillow are available on PyPi as wheels — the new standard packaging mechanism for Python. These prebuilt packages include all neccessary binary dependencies to allow Pillow to run and should be used if you want to install Pillow using PyPi
To use wheels, you need to have a version of
pip>=1.4. If you are using an earlier version (
pip --version) upgrade pip using the following:
pip install --upgrade pip
pip is upgraded,
pip install will use platform-specific wheel files by default if they are available. Use the following command to upgrade Pillow to the latest version available on PyPi:
pip install --upgrade Pillow
Ubuntu 12.04 LTS or Raspian Wheezy 7.0
sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk
with One-to-One Code Mentoring
Improve your coding skills with tailored one-to-one Python mentoring.
Get customised training and advice covering Python basics, data science, GUIs or Django/Flask web development.
Level up your skills fast with directed Python tutoring & coaching.
Available daily 8am-6pm CET/CEST Online
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 Fedora 20 equivalent of
sudo yum install libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel
Mac OS X (via Homebrew)
On Mac OS X with Homebrew this can be fixed using:
brew install libjpeg zlib
You may also need to force-link zlib using the following:
brew link zlib --force
Thanks to Panos Angelopoulous and nelsonvarela in the comments.
Update 5th July 2016: In current versions of Homebrew the above may no longer work, as there is no longer a formula for
zlib available in the main repository (Homebrew will prompt you to install
lzlib which is a different library and will not solve this problem).
There is a formula available in the dupes repository. You can either tap this repository, and install as normal:
brew tap homebrew/dupes brew install zlib
Or you can install
xcode instead, as follows:
Thanks to benjaminz in the comments and Kal’s answer below
After these are installed the pip installation of Pillow should work normally.
Get regular FAQs tips & tutorials direct to your Inbox.