Error installing requirements

Mats Wichmann mats at wichmann.us
Fri Feb 18 23:13:03 EST 2022


And the question is?

On 2/18/22 00:23, Saruni David wrote:
> PS C:\Users\Nepapa David\cpims_api> pip install -r requirements/base.txt
> DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support
>  for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-suppor
> t pip 21.0 will remove support for this functionality.

By using Python 2.7 you're constrained to very old versions of things.

> Collecting pillow==3.3.2
>   Using cached Pillow-3.3.2.tar.gz (10.6 MB)

And for this one, there was no binary wheel found, apparently, so it
fetched (or in this case used from cache) the source distribution
instead (a VERY old version, Pillow is on 9.0 these days).

So now the source distribution has to be compiled.  pip tries to arrange
that for you, but that often fails on Windows, unless you have all the
requirements set up just right.

> Building wheels for collected packages: pillow
>   Building wheel for pillow (setup.py) ... error
>   ERROR: Command errored out with exit status 1:

... and so it did.

>     File "c:\users\nepapa~1\appdata\local\temp\pip-install-fu6_er\pillow\setup.py", line 521, in build_extensions
>       ' using --disable-%s, aborting' % (f, f))
>   ValueError: zlib is required unless explicitly disabled using --disable-zlib, aborting
>   ----------------------------------------
>   ERROR: Failed building wheel for pillow

And at least one of the reasons is a missing build requirement (there
may be other lurking problems that you just haven't uncovered yet
because it stopped on that one).

Fix, and retry.

Or... maybe try using something more modern?  It's not usually necessary
to compile Pillow, usually binary wheels are available and you avoid
that problem.



More information about the Python-list mailing list