PIP (Pip Installs Packages) is the standard package manager for Python, allowing users to install and manage software packages written in Python.
PIP simplifies the process of installing third-party libraries and dependencies, handling both source distributions and pre-compiled binary packages efficiently. Its ability to fetch packages from the Python Package Index (PyPI) makes it a crucial component for developers working with Python-based projects.
Starting from Python 3.4 and later, PIP comes pre-installed. This tutorial will show how to install PIP, check its version, and configure it for use.
Watch the video below or get started with step 1 now.
Prerequisites
- Python installed on Windows
- Full server administrative access
- cmd or PowerShell to run commands
Note: To open a Windows command prompt, press the “Windows Key+R” to open a “Run” dialog box. Next, type in “cmd”, and then click “OK”. This open a normal Command Prompt.
To open a command prompt as an administrator, press the “Windows Key+R” to open a “Run” dialog box, then type “cmd” and then press Ctrl+Shift+Enter to open an administrator Command Prompt.
Step 1: Confirm that Python is installed
The simplest way to test for a Python installation on your Windows server is to open a command prompt. Once a command prompt window opens, type python and press Enter.
If Python is installed correctly, you should see an output similar to what is shown below.
Python 3.13.2 (v3.13.2:1234567890, Feb 4 2025, 10:15:30) [MSC v.1930 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.If Python is not installed or the system variable path has not been set, you will receive this error message:
Python is not recognized as an internal or external command, operable program or batch file.To resolve this, try launching Python from the folder in which it is installed, adjust your system variables to allow Python to be launched from any location, or re-install Python on Windows.
Step 2: Check if PIP is already installed
PIP is installed by default on many newer Python builds. To check and see if it is already installed on our system, open a command prompt and type the following command.
pip help If PIP is installed, you will receive a message explaining how to use the program.
pip 23.3.1 from C:\Users\YourUsername\AppData\Local\Programs\Python\Python313\Lib\site-packages\pip (python 3.11)If PIP is not installed, you will get an error message stating that the program is not found.
'pip' is not recognized as an internal or external command,
operable program or batch file.This means either:
- PIP is not installed.
- PIP is installed but not added to the system PATH.
- The Python installation is incomplete or misconfigured.
Step 3: Install PIP on Windows
Once you have confirmed that Python is installed correctly, we can proceed with installing PIP. You can choose one of two methods to install PIP on Windows.
Method 1: Install PIP using get-pipp.py
Download PIP with get-pip.py to a folder on your computer.
Open a command prompt and navigate to the folder containing the get-pip.py installer.
Run the following command:
python get-pip.pyPIP should now be installed successfully. If we receive a “file not found” error, double check the directory path to the file.
You can use the dir command to view the entire contents of a directory.
Method 2: Install PIP using ensurepip
If PIP is missing but Python is already installed, you can use ensurepip to install PIP.
Run the following command.
python -m ensurepip --default-pipThis command ensures that PIP is installed using Python’s built-in mechanism. It is useful if PIP is missing but Python is installed.
Step 4: Add PIP to PATH using command prompt
To run PIP from anywhere in command prompt, add it to the system PATH:
After downloading PIP, find PIP’s installation path and run:
python -m site --user-siteThis shows where Python stores packages. However, PIP’s executable is usually in:
C:\Users\YourUsername\AppData\Local\Programs\Python\Python313\ScriptsAdd PIP to PATH (replace YourUsername and Python version):
setx PATH "%PATH%;C:\Users\YourUsername\AppData\Local\Programs\Python\Python313\Scripts"Restart the command prompt. Now you’re ready to verify the PIP installation.
Step 5: Verify installation and check the PIP version
We can now verify that PIP was installed correctly by opening a command prompt and entering the following command.
pip --versionThis command will display the PIP version, its installation path, and the corresponding python version.
You should see output similar to the following:
pip 25.0.1 from C:\Users\YourUsername\AppData\Local\Programs\Python\Python313\Lib\site-packages\pip (python 3.13.2)Upgrading PIP
Like all software, it’s important to keep all of your installations up to date to take advantage of the latest features and security fixes. You can actually use PIP to update itself! To accomplish this, open a command prompt window and enter the following command:
python -m pip install --upgrade pipThis command uninstalls the old version of PIP and installs the latest version.
Downgrading PIP
While uncommon, you may need to downgrade to an earlier version of PIP because of compatibility issues.
To downgrade to a specific version of PIP, open the command prompt and enter the following command (using the version number you need installed).
python -m pip install pip==18.0If PIP does not downgrade correctly, try using the –force-reinstall flag.
python -m pip install --force-reinstall pip==18.0Configuring PIP
PIP allows users to set default options and preferences using configuration files. These settings help customize PIP’s behavior without manually entering options in every command.
The default PIP configuration file location is strongly recommended for storing personal PIP settings. The filepath is:
%HOME%\pip\pip.iniFor older systems, you may want to use the legacy configuration file. The legacy filepath is:
%APPDATA%\pip\pip.iniIf you want to specify a custom configuration file location, set the PIP_CONFIG_FILE environment variable:
setx PIP_CONFIG_FILE "C:\custom\path\pip.ini"To check if it was set correctly:
echo %PIP_CONFIG_FILE%This allows PIP to use a configuration file from any location you choose.
Using PIP to manage Python packages
Now that PIP is installed and configured, you can begin using it to manage your Python packages. For a brief overview of the available commands and syntax for PIP, open a command prompt and enter:
pip helpHere’s a quick list of the most popular commands:
| Command | Description |
pip install package_name | Install a package |
pip install package_name==version | Install a specific version |
pip install --upgrade package_name | Upgrade a package |
pip uninstall package_name | Uninstall a package |
pip list | List all installed packages |
pip list --outdated | Show outdated packages |
pip show package_name | Show package details |
pip install -r requirements.txt | Install multiple packages from a file |
pip freeze > requirements.txt | Save installed packages to a file |
Note: If you’re searching for a package, pip search package_name has been deprecated and disabled due to security concerns with XML-RPC on PyPI.
The easiest and most reliable way to search for Python packages is via the official Python Package Index (PyPI) website. Simply enter the package name in the search bar.
Successfully installed PIP on Windows – What’s next?
This article provides a complete guide on how to install PIP on Windows, enabling seamless management of Python packages.
Whether you’re using a dedicated server, GPU hosting, or a VPS with Windows, Python, and PIP ensure efficient package management for your development needs.
If you’re already a Liquid Web customer, our support staff is always available to assist with any issues 24 hours a day, 7 days a week, 365 days a year.
David Richards