How To Install python3-astroid on Kali Linux

In this tutorial we learn how to install python3-astroid on Kali Linux. python3-astroid is rebuild a new abstract syntax tree from Pythons AST (Python3)

Introduction

In this tutorial we learn how to install python3-astroid on Kali Linux.

What is python3-astroid

python3-astroid is:

The aim of this module is to provide a common base representation of Python source code for projects such as pychecker, pyreverse, pylint… Well, actually the development of this library is essentially governed by pylint’s needs. It used to be called logilab-astng.

It provides a compatible representation which comes from the _ast module. It rebuilds the tree generated by the builtin _ast module by recursively walking down the AST and building an extended ast. The new node classes have additional methods and attributes for different usages. They include some support for static inference and local name scopes. Furthermore, astroid builds partial trees by inspecting living objects.

Main modules are:

  • bases, node_classses and scoped_nodes contain the classes for the different type of nodes of the tree.

  • the manager contains a high level object to get astroid trees from source files and living objects. It maintains a cache of previously constructed tree for quick access.

python3-astroid is the new name of former python3-logilab-astng library.

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

sudo apt-get -y install python3-astroid

Install python3-astroid Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install python3-astroid

Install python3-astroid Using aptitude

If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install python3-astroid

How To Uninstall python3-astroid on Kali Linux

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

sudo apt-get remove python3-astroid

Uninstall python3-astroid And Its Dependencies

To uninstall python3-astroid and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove python3-astroid

Remove python3-astroid Configurations and Data

To remove python3-astroid configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge python3-astroid

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

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

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

Dependencies

python3-astroid have the following dependencies:

References

Summary

In this tutorial we learn how to install python3-astroid package on Kali Linux using different package management tools: apt, apt-get and aptitude.