Later versions of Python automatically come with PIP as a bundle. Older Python versions on Windows may require a manual installation of PIP. This guide will explain the step-by-step procedures in PIP installation and updating or downgrading versions of PIP.
First, check if PIP is currently installed before any installations of PIP on Windows.
Open Command Prompt, then input the succeeding code:
Any response from PIP will confirm that it is currently installed on Windows. If PIP is not installed, an error indicating no possible traces of the program will appear.
Installing Python 2.7.9+ and Python 3.4+ will simultaneously install PIP along with it.
Installation of PIP includes the pyvenv and virtualenv virtual environments.
Current Python installation must be active as required by PIP through a Python Utility. Later versions of Python and Python-enabled virtual environments do not require any rei-nstallations of PIP since it comes installed with the software.
To confirm any installations of Python:
Input the following command on Command Prompt:
Non-recognition of the command will then require you first to install Python to install PIP.
Recognition of the command will be confirmed through a response from Python indicating an option of commands and its current version number.
In order to install PIP, first download the get pip py file from: get-pip.py on pypa.io
Save the downloaded file to any desired Windows folder.
PIP command is included in the installation of PIP since it is considered a “command-line program.”
Open Command Prompt by pressing Windows Key + R, then type “cmd” and hit enter.
Or you can input “command prompt” in the search box and press enter.
The command prompt window will appear through any of these two methods, but the command prompt can require you to open it “As Administrator,” and you should allow this. You will be required to open the program “As Administrator” if any permission to execute errors pops up. Right-click on Command Prompt, then select the “Run as Admin” option to execute the program “As Administrator.”
Make sure that Command Prompt is running and navigate through the cd command to locate the destination folder of the get-pip.py file, which is the file you have just recently downloaded.
Input the PIP install command below:
Any errors indicating that the file can’t be found, make sure you have selected the correct path to the downloaded file’s destination folder.
Using the dir command, you can see the entire contents of your current directory and can be accessed through the command below:
Input the command below to confirm the present PIP version.
After installation of PIP, confirm if the installation process was completed correctly by inputting the following command:
The complete installation will execute the program .
Encountering any errors means there was an issue during installation, and you will need to redo the installation procedure.
If PIP is running on Windows, the file setup should be %HOME%pippip.ini.
Each user also has a setup file, which can be found at %APPDATA%pippip.ini.
The option of composing a custom destination path for the setup file is also available through the environment variable of PIP_CONFIG_FILE.
The “not on the PATH” issue is among the most encountered errors with PIP and generally indicates that the tool you are attempting to execute from your directory cannot be located by Python. Usually, you will be required to locate the correct directory path with which the tool is saved in. After completing this, you will be able to open PIP by launching it through the command.
If you prefer launching pip (or any tool) regardless of location, you can set its installation path directory as part of PATH environment variable through the succeeding steps:
- In “Control Panel,” locate System and Security, then click on System
- Select the “Advanced System Settings” option.
- Select “Environment Variables.”
- Below “System Variables,” rapidly click twice on the variable PATH option.
- Select New, and set the installation path directory of PIP, then click “OK.”
Every so often, PIP will continue to roll out the latest updates, which will optimize the program’s performance or just be mandatory upgrades for safety measures.
To update the PIP version on Windows, open command prompt, then input the succeeding command:
python -m pip install –upgrade pip
This process of upgrading uninstalls the currently outdated PIP version then reinstalls PIP with its latest available version.
Rolling back updates to previous versions may be useful if you encounter any performance issues with the later versions of PIP.
Regressing PIP to an older version will require you to identify which version you want to downgrade to input the succeeding command then:
python -m pip install pip==18.1
Afterward, your desired PIP version should be indicated.
Seeing that you have followed the steps accordingly and achieved the desired outcome, you have now successfully installed PIP on Windows.
You are now able to open PIP and administer your Python combinations.
You can even update or downgrade to any version with PIP that you see fit.
If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.