Ubuntu – How to install pillow in Ubuntu 16.04 LTS


I went to This site for installing Pillow since the original PIL is a discontinued project and so now not so good to use. But, in the table support for Ubuntu 16.04 LTS is unmentioned. It appears neither in the 4.2.x installation guide, or in the 3.0.0 installation guide.

Further, just installing pillow is said to be not enough. There are some dependencies that should be installed first which is also unmentioned for Ubuntu 16.04 LTS. Would the installation steps for Pillow for python 3 given for 14.04 LTS be OK for Ubuntu 16.04 LTS?

If not, How do I install pillow in 16.04 LTS for Python 3.6? (There is support for Python 2.)

Best Answer

According to Wikipedia Pillow is packaged as python-pil and python3-pil in Ubuntu 13.04 and later.

To install the Python Imaging Library in Ubuntu 16.04 and later (and also in Ubuntu 14.04), open the terminal and type:

sudo apt install python-pil # for python 2.X


sudo apt install python3-pil # for python 3.X including python3.6

And if the imageTk import doesn't work, just do this:

sudo apt install python3-pil.imagetk