How To Install python-ptable on Debian 10

Learn how to install python-ptable on Debian 10 with this tutorial. python-ptable is library to represent tabular data in visually appealing ASCII tables

Introduction

In this tutorial we learn how to install python-ptable on Debian 10.

What is python-ptable

python-ptable is:

PrettyTable is a simple Python library designed to make it quick and easy to represent tabular data in visually appealing ASCII tables. It was inspired by the ASCII tables used in the PostgreSQL shell psql. PTable allows for selection of which columns are to be printed, independent alignment of columns (left or right justified or centred) and printing of “sub-tables” by specifying a row range.

This is the PTable fork of prettytable. It has been updated and extended in a mostly backward compatible way. It is provided for packages that need features from the newer version.

This package contains the Python version of prettytable

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

sudo apt-get -y install python-ptable

Install python-ptable Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python-ptable

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

sudo aptitude -y install python-ptable

How To Uninstall python-ptable on Debian 10

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

sudo apt-get remove python-ptable

Uninstall python-ptable And Its Dependencies

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

sudo apt-get -y autoremove python-ptable

Remove python-ptable Configurations and Data

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

sudo apt-get -y purge python-ptable

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

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

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

Dependencies

python-ptable have the following dependencies:

References

Summary

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