How to Install and Use Pip on Windows

Pip is Python’s package installer, and on Windows you rarely need to install it separately: current Python versions from python.org and the Microsoft Store include it. Most “pip isn’t working” problems come down to Python not being installed, or Windows not knowing where pip is. This guide shows how to check, install or repair pip, and use it.

What pip does

Pip downloads packages from the Python Package Index (PyPI), the public library of add-ons for Python, and installs them along with anything they depend on. Packages such as requests for web requests, pandas for data, and pillow for images all install through pip. It also handles updating and removing them, so you don’t have to copy files around by hand.

Quick answer

Open Terminal and run py -m pip --version. If it prints a version, pip is ready. If not, install Python from python.org (pip comes with it), or run py -m ensurepip --upgrade to add pip to an existing Python install.

Step 1: Check whether Python is installed

Open Terminal or Command Prompt and type py --version (or python --version). If you see a version such as Python 3.13, move on to Step 3. If Windows opens the Microsoft Store or says the command isn’t recognized, install Python first. Our guide to checking whether Python is installed correctly covers this in more detail.

Step 2: Install Python (pip included)

  1. Download the latest Python 3 release for Windows from python.org, or install Python from the Microsoft Store.
  2. If you use the python.org installer, tick Add python.exe to PATH on the first screen.
  3. Choose Install Now. The default options include pip and the py launcher.
  4. Close and reopen Terminal so it picks up the new PATH.

Step 3: Confirm pip works

Run py -m pip --version. Using py -m pip instead of plain pip guarantees you’re using the pip that belongs to the Python version you expect, which avoids most PATH confusion.

If pip is missing or broken

  • Run py -m ensurepip --upgrade to install the bundled copy of pip.
  • Or rerun the Python installer, choose Modify, and make sure pip is ticked.
  • Avoid downloading get-pip.py from random sites. If you use it, get it only from the official pypa bootstrap page.

Step 4: Upgrade pip

Run py -m pip install --upgrade pip. Upgrading regularly avoids errors with newer packages.

How to use pip

Task Command
Install a package py -m pip install requests
Install a specific version py -m pip install requests==2.32.3
Upgrade a package py -m pip install --upgrade requests
Remove a package py -m pip uninstall requests
List installed packages py -m pip list
Show details about one package py -m pip show requests
Save your packages to a file py -m pip freeze > requirements.txt
Install from that file py -m pip install -r requirements.txt

Use a virtual environment for projects

Installing everything into one global Python leads to version clashes between projects. Create a separate environment for each project instead:

  1. In your project folder, run py -m venv .venv.
  2. Activate it with .venv\Scripts\activate (in PowerShell, run .venv\Scripts\Activate.ps1).
  3. Install packages with pip install; they go only into this project.
  4. Type deactivate when you’re done.

If PowerShell blocks the activation script, run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned once and try again.

Troubleshooting

  • “‘pip’ is not recognized”: Use py -m pip, or reinstall Python with Add python.exe to PATH ticked.
  • “Access is denied” or permission errors: Install into a virtual environment, or add --user to install just for your account. Don’t run pip as administrator for everyday packages.
  • A package fails to build: Upgrade pip first. Some packages need Microsoft C++ Build Tools, and the error message usually says so.
  • Wrong Python version: Run py --list to see every installed version, then pick one with py -3.12 -m pip install ....

Related: Install a C compiler (GCC) on Windows 10.

Related: Install pygame on Windows.

Frequently asked questions

Can I install pip without Python?

No. Pip is a Python program and needs Python to run.

Is pip the same as pip3?

On Windows they normally point to the same tool for Python 3. Using py -m pip avoids any doubt.

Where does pip install packages?

Into the site-packages folder of the Python you ran it with, or into your virtual environment’s folder when one is active. py -m pip show lists the exact location.

Is it safe to install any package from PyPI?

Most are fine, but anyone can publish to PyPI and fake packages with look-alike names do appear. Check the spelling, look at the project’s homepage and download numbers, and prefer well-known packages.