How To Install python-imaging on Debian 9
Introduction
In this tutorial we learn how to install python-imaging on Debian 9.
What is python-imaging
python-imaging is:
PIL used to provide a PIL.pth file which allowed you to
import Imagebut this is deprecated. Usefrom PIL import Imagenow, or install this compatibility package to temporarily get the old behavior back.
This compatibility package is built for Python 2 only.
There are three methods to install python-imaging on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.
Install python-imaging Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get update
After updating apt database, We can install python-imaging using apt-get by running the following command:
sudo apt-get -y install python-imaging
Install python-imaging Using apt
Update apt database with apt using the following command.
sudo apt update
After updating apt database, We can install python-imaging using apt by running the following command:
sudo apt -y install python-imaging
Install python-imaging Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.
sudo aptitude update
After updating apt database, We can install python-imaging using aptitude by running the following command:
sudo aptitude -y install python-imaging
How To Uninstall python-imaging on Debian 9
To uninstall only the python-imaging package we can use the following command:
sudo apt-get remove python-imaging
Uninstall python-imaging And Its Dependencies
To uninstall python-imaging and its dependencies that are no longer needed by Debian 9, we can use the command below:
sudo apt-get -y autoremove python-imaging
Remove python-imaging Configurations and Data
To remove python-imaging configuration and data from Debian 9 we can use the following command:
sudo apt-get -y purge python-imaging
Remove python-imaging configuration, data, and all of its dependencies
We can use the following command to remove python-imaging configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge python-imaging
Dependencies
python-imaging have the following dependencies:
References
Summary
In this tutorial we learn how to install python-imaging package on Debian 9 using different package management tools: apt, apt-get and aptitude.