How To Install python-klein on Ubuntu 18.04

In this tutorial we learn how to install python-klein on Ubuntu 18.04. python-klein is Python micro-framework for developing web services - Python 2.x

Introduction

In this tutorial we learn how to install python-klein on Ubuntu 18.04.

What is python-klein

python-klein is:

Klein is a micro-framework for developing production-ready web services with Python. It is ‘micro’ in that it has an incredibly small API similar to Bottle and Flask. It is not ‘micro’ in that it depends on things outside the standard library. This is primarily because it is built on widely used and well tested components like Werkzeug and Twisted.

This package contains the Python 2.x module.

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

sudo apt-get -y install python-klein

Install python-klein Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python-klein

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

sudo aptitude -y install python-klein

How To Uninstall python-klein on Ubuntu 18.04

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

sudo apt-get remove python-klein

Uninstall python-klein And Its Dependencies

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

sudo apt-get -y autoremove python-klein

Remove python-klein Configurations and Data

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

sudo apt-get -y purge python-klein

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

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

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

References

Summary

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