Hi,
I am starting a new project using Python 3.8 and I am trying to install Pillow but returning this error and I have searched how to fix it and found this answer https://stackoverflow.com/a/58934933/13176726 and https://stackoverflow.com/a/58934888/13176726 which is:
python -m pip install --upgrade pip
python -m pip install --upgrade Pillow
here is the error:
Collecting Pillow
Using cached Pillow-8.0.1.tar.gz (44.6 MB)
Using legacy 'setup.py install' for Pillow, since package 'wheel' is not installed.
Installing collected packages: Pillow
Running setup.py install for Pillow ... error
ERROR: Command errored out with exit status 1:
command: C:/users/User/desktop/project/venv/bin/python.exe -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:/Users/User/AppData/Local/Temp/pip-ins
tall-c107jru7/pillow/setup.py'"'"'; __file__='"'"'C:/Users/User/AppData/Local/Temp/pip-install-c107jru7/pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open
)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record C:/Users/User/AppData/Local
/Temp/pip-record-smc1a7pf/install-record.txt --single-version-externally-managed --compile --install-headers C:/users/User/desktop/project/venv/include/site/python3.
8/Pillow
cwd: C:/Users/User/AppData/Local/Temp/pip-install-c107jru7/pillow/
Complete output (157 lines):
running install
running build
running build_py
creating build
creating build/lib.mingw-3.8
creating build/lib.mingw-3.8/PIL
copying src/PIL/BdfFontFile.py -> build/lib.mingw-3.8/PIL
copying src/PIL/BlpImagePlugin.py -> build/lib.mingw-3.8/PIL
copying src/PIL/BmpImagePlugin.py -> build/lib.mingw-3.8/PIL
copying src/PIL/BufrStubImagePlugin.py -> build/lib.mingw-3.8/PIL
copying src/PIL/ContainerIO.py -> build/lib.mingw-3.8/PIL
....................several py files.............................
warning: no files found matching '*.c'
warning: no files found matching '*.h'
warning: no files found matching '*.sh'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
no previously-included directories found matching '.ci'
writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
running build_ext
'gcc' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
.................
TypeError: '>=' not supported between instances of 'NoneType' and 'str'
----------------------------------------
ERROR: Command errored out with exit status 1: C:/users/User/desktop/project/venv/bin/python.exe -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:/Users
/User/AppData/Local/Temp/pip-install-c107jru7/pillow/setup.py'"'"'; __file__='"'"'C:/Users/User/AppData/Local/Temp/pip-install-c107jru7/pillow/setup.py'"'"';f=getat
tr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --re
cord C:/Users/User/AppData/Local/Temp/pip-record-smc1a7pf/install-record.txt --single-version-externally-managed --compile --install-headers C:/users/User/desktop/p
roject/venv/include/site/python3.8/Pillow Check the logs for full command output.