How to Install Python py-asn module on Linux?

Py-asn is a Python library that is considered as the extension library which activates very fast Internet Protocol addresses to Autonomous System Number lookups. We can also perform current state and historical state lookups with the help of this package. Input given to this package is MRT/RIB BGP archive. So, in this article, we will be installing the Py-asn package in the Python3 environment on Linux Operating System.

Installing the Py-asn package on Linux using PIP

Requirements:

To install the Py-asn package in Linux follow the following steps:

Step 1: Firstly, we will install the current version of Python3 using the following command.

sudo apt-get install python3

 

Step 2: Now, we will install the pip package manager, which is responsible for installing the external packages. Use the below command to install the pip manager

sudo apt install python3-pip

 

Step 3: Now using the PIP manager we are going to install the Py-asn package. So for the installation run the following command on the terminal.

sudo pip3 install pyasn

 

Verifying the installation of the Py-asn package 

After installing the package, the next important step is to check the installation of the Py-asn package is successful or not. So here, we are simply getting the information of the installed package (Py-asn) by executing the below command on the terminal itself.

python3 -m pip show pyasn

The below output will be displayed after the successful installation of the Py-asn package on your Linux machine.