How To Install elpa-elpy on Ubuntu 20.04

In this tutorial we learn how to install elpa-elpy on Ubuntu 20.04. elpa-elpy is Emacs Python Development Environment

Introduction

In this tutorial we learn how to install elpa-elpy on Ubuntu 20.04.

What is elpa-elpy

elpa-elpy is:

The Emacs Lisp Python Environment in Emacs

Elpy is an Emacs package that brings powerful Python editing to Emacs. It combines a number of existing Emacs packages, and is written in Emacs Lisp as well as Python.

Features:

  • Navigation by code indentation and code definition.
  • Move the current region as a code block.
  • Treat a working tree as a coherent project; search for files, code, or text within the project.
  • Interact with Python interpreters and test runners.
  • Browse the Python built-in documentation.
  • Refactor code and symbols.

There are three methods to install elpa-elpy on Ubuntu 20.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 elpa-elpy Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install elpa-elpy

Install elpa-elpy Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install elpa-elpy

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

sudo aptitude -y install elpa-elpy

How To Uninstall elpa-elpy on Ubuntu 20.04

To uninstall only the elpa-elpy package we can use the following command:

sudo apt-get remove elpa-elpy

Uninstall elpa-elpy And Its Dependencies

To uninstall elpa-elpy and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove elpa-elpy

Remove elpa-elpy Configurations and Data

To remove elpa-elpy configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge elpa-elpy

Remove elpa-elpy configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge elpa-elpy

References

Summary

In this tutorial we learn how to install elpa-elpy package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.