ERROR: Failed building wheel for Pillow
sucrecacao opened this issue · comments
Failled to build pillow on a virtualenv.
Get a really long error message ending with:
ERROR: Command errored out with exit status 1: venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3nw04j89/Pillow/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3nw04j89/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 /tmp/pip-record-d2gme0ys/install-record.txt --single-version-externally-managed --compile --install-headers venv/include/site/python3.7/Pillow Check the logs for full command output.
Solved by making sure every Pillow external library are installed. See the list here https://pillow.readthedocs.io/en/latest/installation.html
Then remplaced Pillow==6.2.0
(latest version) in requirements.txt and it worked
A better answer might to be sure you run on python3.6 and not python3.7
Hi I'm running python 3.6.9, using pip version 20.1.1
The solution i found is writted here: scrapy/scrapy#2115 (comment)
Python 3, you'll need
sudo apt-get install python3 python-dev python3-dev \
build-essential libssl-dev libffi-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
python-pip
Python 2, you'll need
sudo apt-get install python-dev \
build-essential libssl-dev libffi-dev \
libxml2-dev libxslt1-dev zlib1g-dev \
python-pip
I solved this by explicitly deleting the version numbering inside of the requirements.txt
file
That way pip fetched the latest pillow
version
so if forexample you had ...
pillow==7.0.2
change it to ..
pillow
then save the file and rerun the pip install -r requirements.txt
line and it shd work
thanks @HelloMukama, that make sense, solved my problem
@HelloMukama thanks, works now
@HelloMukama thanks, worked
Thanks @HelloMukama. It worked perfectly for me as well.
@HelloMukama works!
ERROR: Could not build wheels for Pillow, reportlab, which is required to install pyproject.toml-based projects