How To Install python-tinycss on Ubuntu 18.04

In this tutorial we learn how to install python-tinycss on Ubuntu 18.04. python-tinycss is complete yet simple CSS parser (Python2 version)

Introduction

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

What is python-tinycss

python-tinycss is:

tinycss is a complete yet simple CSS parser for Python. It supports the full syntax and error handling for CSS 2.1 as well as some CSS 3 modules:

  • CSS Color 3
  • CSS Fonts 3
  • CSS Paged Media 3

It is designed to be easy to extend for new CSS modules and syntax, and integrates well with cssselect for Selectors 3 support.

This package contains the Python 2 version of the library.

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

sudo apt-get -y install python-tinycss

Install python-tinycss Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python-tinycss

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

sudo aptitude -y install python-tinycss

How To Uninstall python-tinycss on Ubuntu 18.04

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

sudo apt-get remove python-tinycss

Uninstall python-tinycss And Its Dependencies

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

sudo apt-get -y autoremove python-tinycss

Remove python-tinycss Configurations and Data

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

sudo apt-get -y purge python-tinycss

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

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

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

References

Summary

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