How To Install python-htmlgen on Debian 9

In this tutorial we learn how to install python-htmlgen on Debian 9. python-htmlgen is Python library for the generation of HTML

Introduction

In this tutorial we learn how to install python-htmlgen on Debian 9.

What is python-htmlgen

python-htmlgen is:

HTMLgen is a class library for the generation of HTML documents with Python scripts. It’s used when you want to create HTML pages containing information which changes from time to time. For example you might want to have a page which provides an overall system summary of data collected nightly. Or maybe you have a catalog of data and images that you would like formed into a spiffy set of web pages for the world to browse. Python is a great scripting language for these tasks and with HTMLgen it’s very straightforward to construct objects which are rendered into consistently structured web pages. Of course, CGI scripts written in Python can take advantage of these classes as well.

There are three methods to install python-htmlgen 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-htmlgen 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-htmlgen using apt-get by running the following command:

sudo apt-get -y install python-htmlgen

Install python-htmlgen Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python-htmlgen using apt by running the following command:

sudo apt -y install python-htmlgen

Install python-htmlgen 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-htmlgen using aptitude by running the following command:

sudo aptitude -y install python-htmlgen

How To Uninstall python-htmlgen on Debian 9

To uninstall only the python-htmlgen package we can use the following command:

sudo apt-get remove python-htmlgen

Uninstall python-htmlgen And Its Dependencies

To uninstall python-htmlgen and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove python-htmlgen

Remove python-htmlgen Configurations and Data

To remove python-htmlgen configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge python-htmlgen

Remove python-htmlgen configuration, data, and all of its dependencies

We can use the following command to remove python-htmlgen configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python-htmlgen

Dependencies

python-htmlgen have the following dependencies:

References

Summary

In this tutorial we learn how to install python-htmlgen package on Debian 9 using different package management tools: apt, apt-get and aptitude.