[Fixed]-Getting Error While Installing Pillow using pip


you need to install the zlib-devel package in Linux in order to resolve this particular issue.

dnf install zlib-devel

works for Fedora.


The newly released Python 3.0.0 now requires libjpeg for .jpg (and zlib for .png) by default.

From the docs:

  • Starting with Pillow 3.0.0, libjpeg is required by default, but may be disabled with the --disable-jpeg flag.

See here for how to use build options, and elsewhere on that page for instructions how to install libraries for different platforms.



For AWS (Red Hat) you need to run the following two commands to get Pillow to install.

sudo yum install libjpeg
sudo yum install zlib-devel

Also note that you have to uninstall PIL if you are using it in the same environment.

Leave a comment