How To Install python-ebooklib on Ubuntu 18.04

In this tutorial we learn how to install python-ebooklib on Ubuntu 18.04. python-ebooklib is Python 2 E-book library for handling EPUB2/EPUB3/Kindle formats

Introduction

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

What is python-ebooklib

python-ebooklib is:

EbookLib is a Python library for managing EPUB2/EPUB3 and Kindle files. It’s capable of reading and writing EPUB files programmatically (Kindle support is under development).

The API is designed to be as simple as possible, while at the same time making complex things possible too. It has support for covers, table of contents, spine, guide, metadata and more. EbookLib works with Python 2.7 and Python 3.3, this is the Python 2 version of the package.

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

sudo apt-get -y install python-ebooklib

Install python-ebooklib Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python-ebooklib

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

sudo aptitude -y install python-ebooklib

How To Uninstall python-ebooklib on Ubuntu 18.04

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

sudo apt-get remove python-ebooklib

Uninstall python-ebooklib And Its Dependencies

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

sudo apt-get -y autoremove python-ebooklib

Remove python-ebooklib Configurations and Data

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

sudo apt-get -y purge python-ebooklib

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

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

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

References

Summary

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