The Wayback Machine - https://web.archive.org/web/20240204104003/https://www.geeksforgeeks.org/how-to-install-pil-on-linux/
Open In App
Related Articles

How to Install PIL on Linux?

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

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

Output:

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
PIL.__version__

This will output the currently installed version of the PIL.

Output:

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

Output:

installing pil using aptitude on linux

installing pil using aptitude

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Looking for a place to share your ideas, learn, and connect? Our Community portal is just the spot! Come join us and see what all the buzz is about!


Last Updated : 30 Sep, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials