How To Install python-mako on Ubuntu 20.04

In this tutorial we learn how to install python-mako on Ubuntu 20.04. python-mako is fast and lightweight templating for the Python platform

Introduction

In this tutorial we learn how to install python-mako on Ubuntu 20.04.

What is python-mako

python-mako is:

Mako is a template library written in Python. It provides a familiar, non-XML syntax which compiles into Python modules for maximum performance. Mako’s syntax and API borrows from the best ideas of many others, including Django templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded Python (i.e. Python Server Page) language, which refines the familiar ideas of componentized layout and inheritance to produce one of the most straightforward and flexible models available, while also maintaining close ties to Python calling and scoping semantics.

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

sudo apt-get -y install python-mako

Install python-mako Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python-mako

Install python-mako 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 Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install python-mako

How To Uninstall python-mako on Ubuntu 20.04

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

sudo apt-get remove python-mako

Uninstall python-mako And Its Dependencies

To uninstall python-mako and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove python-mako

Remove python-mako Configurations and Data

To remove python-mako configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge python-mako

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

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

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

References

Summary

In this tutorial we learn how to install python-mako package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.