How To Install python-instant on Ubuntu 18.04

In this tutorial we learn how to install python-instant on Ubuntu 18.04. python-instant is simple inlining of C/C++ code in Python 2

Introduction

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

What is python-instant

python-instant is:

Instant is a Python module that allows for instant inlining of C and C++ code in Python. It is a small Python module built on top of SWIG and Distutils.

Instant is part of the FEniCS project https://fenicsproject.org.

This package installs the library for Python 2.

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

sudo apt-get -y install python-instant

Install python-instant Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python-instant

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

sudo aptitude -y install python-instant

How To Uninstall python-instant on Ubuntu 18.04

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

sudo apt-get remove python-instant

Uninstall python-instant And Its Dependencies

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

sudo apt-get -y autoremove python-instant

Remove python-instant Configurations and Data

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

sudo apt-get -y purge python-instant

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

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

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

References

Summary

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