How To Install python3-lupa on Ubuntu 18.04

In this tutorial we learn how to install python3-lupa on Ubuntu 18.04. python3-lupa is Python wrapper around LuaJIT (Python3 version)

Introduction

In this tutorial we learn how to install python3-lupa on Ubuntu 18.04.

What is python3-lupa

python3-lupa is:

Lupa integrates the runtimes of Lua or LuaJIT2 into CPython. It is a partial rewrite of LunaticPython in Cython with some additional features such as proper coroutine support.

Features:

  • separate Lua runtime states through a LuaRuntime class
  • Python coroutine wrapper for Lua coroutines
  • iteration support for Python objects in Lua and Lua objects in Python
  • proper encoding and decoding of strings (configurable per runtime, UTF-8 by default)
  • frees the GIL and supports threading in separate runtimes when calling into Lua
  • written for LuaJIT2, but also works with the normal Lua interpreter
  • easy to hack on and extend as it is written in Cython, not C

This package contains the Python 3 version of the library.

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

sudo apt-get -y install python3-lupa

Install python3-lupa Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python3-lupa

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

sudo aptitude -y install python3-lupa

How To Uninstall python3-lupa on Ubuntu 18.04

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

sudo apt-get remove python3-lupa

Uninstall python3-lupa And Its Dependencies

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

sudo apt-get -y autoremove python3-lupa

Remove python3-lupa Configurations and Data

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

sudo apt-get -y purge python3-lupa

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

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

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

References

Summary

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