Skip to content
Related Articles

Related Articles

How to Install PIL on Linux?

Improve Article
Save Article
Like Article
  • Last Updated : 30 Sep, 2021

PIL is an acronym for Python Image Library. It is also called Pillow. It is one of the most famous libraries for manipulating images using the python programming language. It is a free and open-source Python library.

Installing PIL on Linux:

Method 1: Using PIP command:

Step 1: Open up the Linux terminal and type the following command and hit enter.

pip install pillow


installing PIL using pip on linux

installing PIL

Step 2: To check if PIL is successfully installed, open up the python terminal by typing python3 in the terminal. This will open up the python3 interactive console now type the following command to check the current version of the PIL.

import PIL

This will output the currently installed version of the PIL.


PIL version

PIL version

Method 2: Using aptitude package manager

Aptitude is just a frontend version of the apt command that we used to install packages. Aptitude is an interactive package manager, it provides a list of all the matching packages that we want to install. It also finds and installs all the required dependencies for the package.

Step 1: Run the following command to install the PIL using Aptitude.

sudo aptitude install python3-pil


installing pil using aptitude on linux

installing pil using aptitude

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!