[Fixed] “Failed building wheel for Pillow” in Python
Do you get an error while installing the pillow Python library?
Failed building wheel for Pillow
Pillow is one of the very popular Python libraries and has been used by many other Python libraries as a dependency. So you may come across this failure even if you are trying to install any other library which is dependent on the pillow.
To solve this problem, you have to install two other libraries
zlib1g-dev from Linux package manager.
Here is the command. Execute it on bash shell/console.
apt-get install libjpeg-dev zlib1g-dev
And then install the pillow Python module.
pip3 install Pillow
That is all. With these simple two commands, you will be able to install the pillow Python module without any hassle.
I come across this error “Failed building wheel for Pillow” while setting up the Python Django project. I have executed these commands on my Ubuntu system and hopefully, it will work with any other Linux OS.
If you still face any issues, let me know in the comment. I will try my best to help you. All the best!