How to install PYTHON packages in NS2

  To install Python packages into NS2, you need to follow the steps listed below. If you run into any problems while importing, feel free to reach out to ns2project.com. We also provide great ideas and topics for your projects. Python represents a pivotal moment in the evolution of the Python programming language, having been initially launched in October 2000. Its appeal lies in its readability, simplicity, and versatility, which have facilitated its swift adoption across various fields, including web development and scientific research. The introduction of Python 2 brought forth several essential features that have influenced contemporary programming practices, such as garbage collection for efficient memory management, list comprehensions for streamlined coding, and improved Unicode support, which simplifies the handling of international text. However, despite its extensive usage, Python 2 officially reached its end of life on January 1, 2020, signifying that it no longer receives updates, bug fixes, or security enhancements. The Python community now advocates for a transition to Python 3, which was developed to overcome the limitations of Python 2 and to introduce new functionalities, such as refined syntax, enhanced performance, and greater consistency across different platforms. While Python 2 continues to be utilized for the maintenance of legacy systems, Python 3 is the preferred version for all new development projects, providing a sustainable environment with continuous support and improvements.

PRE-REQUISITES:

  1. Fresh installation of Ubuntu 16.04 LTS:

Screenshot:

Fresh installation of Ubuntu 16.04 LTS

INSTALL DEPENDENCIES OF PYTHON:

  1. Open a terminal, Copy and Paste the commands to install required package:

Screenshot:

2.System File Update Command:

First of all, we need to updates the list of available packages and their versions stored in the system’s package index. Use below command to update the system package.

Command:      “sudo apt-get update”

Screenshot:

3.Python Installation Command:

Next, we need to install Python in the ubuntu system. Use below command to install the Python package.

Command:      “sudo apt-get install python”

Screenshot:

If You got any Prompt to additional package installation, then Click Y to install the Python packages.

Screenshot:

Python Installed successfully in the Ubuntu 16.04 system.