How to use pip to install python modules in easy way?



While working in python, we will need external libraries or modules to solve the specific problems. This can be done by using the python built-in package manage pip making it easy to install, upgrade and manipulate packages.

In this articles, we will learn how to use pip to install the python modules in easy way.

pip

The pip stands for 'pip installs packages'. It is the default package installer for python and is used to install the packages from the python package index and other indexes.

For checking if the pip is installed or not, run the following command :

pip --version

If not installed, we can install it by downloading 'get-pip.py' and running :

python get-pip.py

Installing Single Package

In this scenario, we are going to use the command to install the requests module, Which is used to make the HTTP requests in the Python. The install method tells the pip to download the package from PyPI and install to the python environment.

pip install requests

The output of the above program is as follows -

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: requests in c:\users\lenovo\appdata\roaming\python\python313\site-packages (2.32.3)......

Installing the Specific Version

Here, we are using '==' to specify the exact version to get installed. It is useful, when we require the specific version for compatibility.

pip install numpy==1.23.0

The output of the above program is as follows -

Defaulting to user installation because normal site-packages is not writeable
Collecting numpy==1.23.0
  Downloading numpy-1.23.0.tar.gz (10.7 MB)..............

Upgrading an Existing Package

In this approach, we are using the --upgrade flag to tell the pip to update the existing package to its latest version. In this case, we are upgrading pip itself to make sure we are using the latest features.

 pip install --upgrade pip

The output of the above program is as follows -

Requirement already satisfied: pip in c:\python313\lib\site-packages (24.3.1)
Collecting pip
  Using cached pip-25.1.1-py3-none-any.whl.metadata (3.6 kB).....
Updated on: 2025-08-28T12:57:43+05:30

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements