WindowsDevOps

How to Install Pip on Windows? (Step-by-Step Tutorial)

Introduction

In this era of tech and innovation, we need to stay one step ahead. It is always better to learn a new skill set and install highly advanced components to enhance performance. Python is one such solution. It is an extensively used high-level programming language. You can work quickly and integrate systems more effectively with Python. As a programming language, it works effectively on Windows systems, so you can expect great outcomes.

In this tutorial, we will define PIP for Python and discuss its uses. We will also highlight how to install PIP on Windows and upgrade or downgrade it for your effective use.

What is Python PIP?

What is Python PIP?

Python PIP is an acronym for PIP, which stands for “PIP Installs Packages”. PIP, as it is more commonly known, gets a widely used package-management system. It got created to install libraries on our local machine that are not included in the default distribution of the Python programming language. It becomes easier to then manage them from the command line.

PIP allows users to access these libraries by standard from the Python Package Index. A large number of third-party options for a variety of applications are available in this fundamental online repository. As long as it complies with PEP 503, PIP can also connect to another local or online repository if necessary.

System Requirements

Typically, we tend to overlook this basic requirement but it is easily important. When you know and fully understand the system’s requirements, you can configure your preferred software and apps quite easily. The system requirements for Python are:

  • A Windows server-powered computer system gets required.
  • Additionally, you will require access to the command prompt window.

Before Installing, Check if PIP is already Installed

Before Installing, Check if PIP is already Installed

Examine whether PIP has already been installed on Windows before moving ahead.

1. Open the window for the command prompt:

  • Press the Windows Key along with the X.
  • Press Run.
  • Enter cmd.exe into the search box.
Before Installing, Check if PIP is already Installed

The “Command Prompt” icon can also get opened by typing cmd into the Windows search bar.

2. Enter the next command into the command prompt:

pip help
pip help
Check if PIP is already installed

Only when PIP responds, it gets activated and set up. If not, a message will appear notifying that the program was not found.

Before learning how to install PIP on Windows, read this article to learn How To Install Python 3 on Windows 10

How to Install PIP on Windows?

How to Install PIP on Windows?

To install PIP on Windows, perform the steps highlighted below.

Phase 1: Get PIP get-pip.py.

Install the get-pip.py file before incorporating PIP.

1. Open a command prompt if it is not already open. To do this, open the Windows search box, enter cmd, and then click the icon.

 Get PIP get-pip.py

2. Next, execute the command below to install the get-pip.py file:

curl -o get-pip.py https://bootstrap.pypa.io/get-pip.py
curl -o get-pip.py https://bootstrap.pypa.io/get-pip.py

Phase 2: PIP Installation on Windows

Write the following to install PIP:

get-pip.py in Python
get-pip.py in Python

If somehow the file cannot get found, check the direction to the folder in which it got stored. By using the following command, you can see what’s in your current working directory:

dir
dir

A complete listing of a directory’s contents gets returned by the dir command.

Phase 3: Inspect the Installation

After you’ve implemented PIP, you can verify its progress by entering the following:

pip -v
pip -v

When the program starts up, you will find the placement of the software package and then a list of commands that will work with pip if PIP has been installed.

  • If you encounter a problem, try installing again.

Phase 4: Add the Pip conditions to Windows

To avoid receiving the “not on PATH” error when running PIP from any location, you should add it to the Windows configuration file. Take the actions listed below to accomplish this:

  • Start looking for the System and Security window in the Control Layer.
Start looking for the System and Security window in the Control Layer.
  • Select System Settings from the menu.
Select System settings from the menu.
  • After that, choose Advanced system settings.
After that, choose Advanced system settings.
  • Click twice on the Path variable under System Variables in the Environment Variables window.
Click twice on the Path variable under System Variables in the Environment Variables window.
Click twice on the Path variable under System Variables in the Environment Variables window.
  • From there, choose New and enter the path to the directory in which you installed PIP.
  • Save the changes by clicking OK.

Step 5: Setup

  • The PIP configuration file for Windows is pip.ini, located in %HOME%pip.
  • A legacy per-user file format is also present. It can get found at %APPDATA%pippip.ini.
  • PIP CONFIG FILE is an environment variable that you can use to specify a particular path for this configuration file.

How to Upgrade PIP on Windows?

How to Upgrade PIP on Windows?

PIP on Windows could require a specialized update to the most recent version to stay current and operate perfectly. We can use the command line to accomplish this by executing the following prompt:

python -m pip install –upgrade pip
python -m pip install --upgrade pip

PIP will then get updated by uninstalling the previous version and installing the most latest versions.

How to Downgrade PIP on Windows?

How to Downgrade PIP on Windows?

Another option is to downgrade PIP to a particular earlier version. In some conditions, namely when a new version has compatibility problems, this action could get required. On Windows, we should launch the command prompt and issue the following command to scale down PIP:

python -m pip install pip==<version>

Consider that our goal is to scale down it to version 20.3 first. If so, the precise command will be:

python -m pip install pip==20.3
python -m pip install pip==20.3

We can use python -V to check whether we’ve got the correct version of PIP after downgrading it.

Read this article to learn how to check Python Version in Linux, Mac, & Window

Summing Up

Several topics relating to the PIP configuration on Windows got covered in this guide. We can start managing Python libraries with PIP now that it has been correctly installed on Windows. Now let us begin by launching pip help from the command line and examining the choices and commands offered by this program.

Arpit Saini

He is the Chief Technology Officer at Hostbillo Hosting Solution and also follows a passion to break complex tech topics into practical and easy-to-understand articles. He loves to write about Web Hosting, Software, Virtualization, Cloud Computing, and much more.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *