How To Install python-jsonrpclib on Ubuntu 18.04

In this tutorial we learn how to install python-jsonrpclib on Ubuntu 18.04. python-jsonrpclib is implementation of the JSON-RPC v2.0 specification

Introduction

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

What is python-jsonrpclib

python-jsonrpclib is:

This library implements the JSON-RPC 2.0 proposed specification in pure Python. It is designed to be as compatible with the syntax of xmlrpclib as possible (it extends where possible), so that projects using xmlrpclib could easily be modified to use JSON and experiment with the differences.

It is backwards-compatible with the 1.0 specification, and supports all of the new proposed features of 2.0, including:

  • Batch submission (via MultiCall)
  • Keyword arguments
  • Notifications (both in a batch and ’normal')
  • Class translation using the ‘jsonclass’ key.

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

sudo apt-get -y install python-jsonrpclib

Install python-jsonrpclib Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python-jsonrpclib

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

sudo aptitude -y install python-jsonrpclib

How To Uninstall python-jsonrpclib on Ubuntu 18.04

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

sudo apt-get remove python-jsonrpclib

Uninstall python-jsonrpclib And Its Dependencies

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

sudo apt-get -y autoremove python-jsonrpclib

Remove python-jsonrpclib Configurations and Data

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

sudo apt-get -y purge python-jsonrpclib

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

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

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

References

Summary

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