How To Install pypy-unidecode on Ubuntu 18.04

In this tutorial we learn how to install pypy-unidecode on Ubuntu 18.04. pypy-unidecode is ASCII transliterations of Unicode text (PyPy module)

Introduction

In this tutorial we learn how to install pypy-unidecode on Ubuntu 18.04.

What is pypy-unidecode

pypy-unidecode is:

It often happens that you have text data in Unicode, but you need to represent it in ASCII for display. One could represent non-roman Unicode characters as “???” or “\15BA\15A0\1610”, but neither is useful to the user reading the text.

Unidecode tries to represent it in ASCII characters (i.e., the universally displayable characters between 0x00 and 0x7F), where the compromises taken when mapping between two character sets are chosen to be near what a human with a US keyboard would choose.

This module generally produces better results than simply stripping accents from characters (which can be done in Python with built-in functions). It is based on hand-tuned character mappings that for example also contain ASCII approximations for symbols and non-Latin alphabets.

unidecode is a Python port of the Text::Unidecode Perl module for PyPy.

There are three methods to install pypy-unidecode 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 pypy-unidecode Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install pypy-unidecode

Install pypy-unidecode Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install pypy-unidecode

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

sudo aptitude -y install pypy-unidecode

How To Uninstall pypy-unidecode on Ubuntu 18.04

To uninstall only the pypy-unidecode package we can use the following command:

sudo apt-get remove pypy-unidecode

Uninstall pypy-unidecode And Its Dependencies

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

sudo apt-get -y autoremove pypy-unidecode

Remove pypy-unidecode Configurations and Data

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

sudo apt-get -y purge pypy-unidecode

Remove pypy-unidecode configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge pypy-unidecode

References

Summary

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