Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install Pillow for Python 3.x in Windows - Zlib is required

I am using PyCharm with Python 3.0 and I want to import Pillow Module.

While installing the Pillow module from Project Interpreter, I got a message which says:

ValueError: zlib is required unless explicitly disabled using --disable-zlib, aborting.

enter image description here

I have also tried installing the same from command line by using both pip install and easy install but the command line is also throwing the same error.

I tried to find several solution in internet, but most of them are for Linux. for example, this solution: no module named zlib

How can I solve this issue in Windows and with PyCharm ?

like image 948
Bluemarble Avatar asked Aug 03 '16 02:08

Bluemarble


People also ask

How do I import a Python Pillow?

To load the image, we simply import the image module from the pillow and call the Image. open(), passing the image filename. Instead of calling the Pillow module, we will call the PIL module as to make it backward compatible with an older module called Python Imaging Library (PIL).

Does Python 3.8 support pillows?

\AppData\Local\Temp\pip-install-dmx24pn4\Pillow\setup.py:29: RuntimeWarning: Pillow does not yet support Python 3.8 and does not yet provide prebuilt Windows binaries. We do not recommend building from source on Windows.

How do you check Pillow is installed or not?

Step 2: To check if PIL is successfully installed, open up the python terminal by typing python3 in the terminal. This will open up the python3 interactive console now type the following command to check the current version of the PIL. This will output the currently installed version of the PIL.


1 Answers

I spent almost a day figuring out what is wrong with pillow installation. It was working fine till yesterday and suddenly stopped working from today. Finally got it figured out, Few of my team mates upgraded python to 3.6 version which is now available for download. Since Pillow is not yet made compatible with 3.6 and is supporting only till 3.5.2 this error popped up.

Resolution is to check if Pillow supports your version of python. Once I reverted python back to 3.5.2 the installation worked like a charm and no errors encountered.

Hope this help resolve your issue.

like image 106
Doogle Avatar answered Sep 25 '22 06:09

Doogle