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

14,206

Solution 1

Its Simple Go To Virtualenv

and run

easy_install Pillow

It works fine

Solution 2

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.

Share:
14,206
Bluemarble
Author by

Bluemarble

Updated on July 20, 2022

Comments

  • Bluemarble
    Bluemarble almost 2 years

    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 ?

  • BenjaminGolder
    BenjaminGolder over 7 years
    I'm on Python 3.6 and Pillow 4.0 seems to work fine. "Pillow >= 3.5.0 supports Python versions 2.7, 3.3, 3.4, 3.5, 3.6"
  • Jonathan
    Jonathan about 7 years
    They distutils/python team really needs to get their act together. It makes no sense to have to switch between pip & easy_install. No other language does this
  • user2665773
    user2665773 about 4 years
    I am getting the same "RequiredDependencyException('\n\nThe headers or library files could not be found for zlib,\na required dependency when compiling Pillow from source.\n" using easy_install in the Virtualenv.
  • moarra
    moarra over 2 years
    Same here, still not working and getting RequiredDependencyException