How To Install python-forge on Debian 9
Introduction
In this tutorial we learn how to install python-forge on Debian 9.
What is python-forge
python-forge is:
Forge is a mocking library for Python. It draws most of its inspiration from Mox. It aims to be simple, but still feature-rich, and provide maximum flexibility for unit testing using the mock approach.
This package contains the Python 2 version of the forge module.
There are three methods to install python-forge 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-forge 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-forge using apt-get by running the following command:
sudo apt-get -y install python-forge
Install python-forge Using apt
Update apt database with apt using the following command.
sudo apt update
After updating apt database, We can install python-forge using apt by running the following command:
sudo apt -y install python-forge
Install python-forge 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-forge using aptitude by running the following command:
sudo aptitude -y install python-forge
How To Uninstall python-forge on Debian 9
To uninstall only the python-forge package we can use the following command:
sudo apt-get remove python-forge
Uninstall python-forge And Its Dependencies
To uninstall python-forge and its dependencies that are no longer needed by Debian 9, we can use the command below:
sudo apt-get -y autoremove python-forge
Remove python-forge Configurations and Data
To remove python-forge configuration and data from Debian 9 we can use the following command:
sudo apt-get -y purge python-forge
Remove python-forge configuration, data, and all of its dependencies
We can use the following command to remove python-forge configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge python-forge
Dependencies
python-forge have the following dependencies:
References
Summary
In this tutorial we learn how to install python-forge package on Debian 9 using different package management tools: apt, apt-get and aptitude.