Before we start with how to install pip for Python on Windows, let’s first go through the basic introduction to Python. Python is a widely used general-purpose, high-level programming language. Python is a programming language that lets you work quickly and integrate systems more efficiently.
PIP is a package management system used to install and manage software packages/libraries written in Python. We can install Python packages using the python pip install command. These files are stored in a large “online repository” termed as Python Package Index (PyPI). pip uses PyPI as the default source for packages and their dependencies. So whenever you type:
pip install package_name
pip will look for that package on PyPI and if found, it will download and install the package on your local system.
Check if Python is installed
Run the following command to test if Python is installed or not. If not click here.
If it is installed, You will see something like this:
Python pip Install and Download
Python PIP can be downloaded and installed using +the command line by going through the following steps:
- Using cURL in Python
- Manually install Python PIP on Windows
Method 1: Using cURL in Python
Curl is a UNIX command that is used to send the PUT, GET, and POST requests to a URL. This tool is utilized for downloading files, testing REST APIs, etc.
Step 1: Open the cmd terminal
Step 2: In python, a curl is a tool for transferring data requests to and from a server. Use the following command to request:
curl https://bootst/rap.pypa.io/get-pip.py -o get-pip.py
Method 2: Manually install Python PIP on Windows
Python pip must be manually installed on Windows. You might need to use the correct version of the file from pypa.io if you’re using an earlier version of Python or pip. Get the file and save it to a folder on your PC.
Step 1: Download the get-pip.py (https://bootstrap.pypa.io/get-pip.py) file and store it in the same directory as python is installed.
Step 2: Change the current path of the directory in the command line to the path of the directory where the above file exists.
Step 3: get-pip.py is a bootstrapping script that enables users to install pip in Python environments. Run the command given below:
Step 4: Now wait through the installation process. Voila! pip is now installed on your system.
Verification of the Installation Process
One can easily verify if the pip has been installed correctly by performing a version check on the same. Just go to the command line and execute the following command:
Adding PIP To Windows Environment Variables
If you are facing any path error then you can follow the following steps to add the pip to your PATH. You can follow the following steps to set the Path:
- Go to System and Security > System in the Control Panel once it has been opened.
- On the left side, click the Advanced system settings link.
- Then select Environment Variables.
- Double-click the PATH variable under System Variables.
- Click New, and add the directory where pip is installed, e.g. C:Python33Scripts, and select OK.
Upgrading Pip On Windows
pip can be upgraded using the following command.
python -m pip install -U pip
Downgrading PIP On Windows
It may happen sometimes that your pip current pip version is not supporting your current version of python or machine for that you can downgrade your pip version with the help of Python pip install command and the following command.
Note: You can mention the version you want to install
python -m pip install pip==17.0
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses
are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!