How To Install python3-pprintpp on Debian 12

Learn how to install python3-pprintpp on Debian 12 with this tutorial. python3-pprintpp is drop-in replacement for pprint thats actually pretty

Introduction

In this tutorial we learn how to install python3-pprintpp on Debian 12.

What is python3-pprintpp

python3-pprintpp is:

Unlike pprint, pprintpp strives to emit a readable, largely PEP8-compliant, representation of its input.

It also has explicit support for: the collections module (defaultdict and Counter) and numpy arrays.

Unicode characters, when possible, will be printed un-escaped. This is done by checking both the output stream’s encoding (defaulting to utf-8) and the character’s Unicode category. An effort is made to print only characters which will be visually unambiguous: letters and numbers will be printed un-escaped, spaces, combining characters, and control characters will be escaped.

Subclassess of built-in collection types which don’t define a new repr will have their class name explicitly added to their repr (while custom repr methods will be respected).

There are three methods to install python3-pprintpp on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install python3-pprintpp Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install python3-pprintpp using apt-get by running the following command:

sudo apt-get -y install python3-pprintpp

Install python3-pprintpp Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python3-pprintpp

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

sudo aptitude -y install python3-pprintpp

How To Uninstall python3-pprintpp on Debian 12

To uninstall only the python3-pprintpp package we can use the following command:

sudo apt-get remove python3-pprintpp

Uninstall python3-pprintpp And Its Dependencies

To uninstall python3-pprintpp and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove python3-pprintpp

Remove python3-pprintpp Configurations and Data

To remove python3-pprintpp configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge python3-pprintpp

Remove python3-pprintpp configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge python3-pprintpp

Dependencies

python3-pprintpp have the following dependencies:

References

Summary

In this tutorial we learn how to install python3-pprintpp package on Debian 12 using different package management tools: apt, apt-get and aptitude.