How To Install python-msgpack on Ubuntu 18.04

In this tutorial we learn how to install python-msgpack on Ubuntu 18.04. python-msgpack is Python implementation of MessagePack format

Introduction

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

What is python-msgpack

python-msgpack is:

MessagePack is a binary-based efficient object serialization format. It enables the exchange of structured objects between many languages like JSON. But unlike JSON, it is very fast and small.

This package contains a Python extension module implementing the MessagePack format.

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

sudo apt-get -y install python-msgpack

Install python-msgpack Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python-msgpack

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

sudo aptitude -y install python-msgpack

How To Uninstall python-msgpack on Ubuntu 18.04

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

sudo apt-get remove python-msgpack

Uninstall python-msgpack And Its Dependencies

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

sudo apt-get -y autoremove python-msgpack

Remove python-msgpack Configurations and Data

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

sudo apt-get -y purge python-msgpack

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

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

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

References

Summary

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