I am trying to run a Python program with pyautogui but there's a problem because it is telling me that Pillow is not installed. I tried to install it or upgrade it with commands such as
pip install Pillow --upgrade
but nothing worked.
On the documentation they say that Pillow doesn't coexist with PIL so we need to uninstall it but I can't because it says that it is not installed.
The error is:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
and also
Collecting Pillow
Using cached Pillow-9.2.0.tar.gz (50.0 MB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: Pillow
Building wheel for Pillow (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
zlib
(The headers or library files could not be found for zlib), which seems to be one of Pillow's dependencies. You need to be able to install zlib first, to install Pillow. – Duffy