|

Pip Is Not Recognized On Windows: How To Fix It (2026)

Quick answer

  • Run pip as a module instead of as its own command: type py -m pip –version to check it, and py -m pip install followed by the package name to install; the Python documentation recommends python -m pip when the pip command is not found.
  • To make plain pip and package commands work, run py install –refresh and make sure the global shortcuts directory it shows is on PATH.
  • If you use a virtual environment, activate it first with .venv\Scripts\activate; if pip itself is missing, py -m ensurepip –upgrade installs it.

Applies to: Python on Windows; pip documentation v26.3 and Python 3.15.2 documentation

This guide is for anyone who types pip install in a Windows terminal and gets an error saying pip is not recognized or command not found.

The fix is usually to call pip through Python, because that does not depend on a pip.exe file being found on PATH.

The steps come from the Python documentation page for Windows and the pip documentation, both read on November 29, 2026.

Table of Contents

Quick answer: which fix to try first

SituationTry this
pip command not found, Python workspy -m pip --version, then use py -m pip for everything
You want plain pip to workRun py install --refresh and put the global shortcuts directory on PATH
A package installed but its command is not foundActivate your virtual environment, or run py install --refresh
py -m pip says there is no module pippy -m ensurepip --upgrade
py itself is not foundFix Python first, see our guide linked below

Why pip is not found when Python works

On Windows, pip is both a Python module and a small program that Windows has to find by name.

The Python documentation says a missing pip command can mean the package is missing its generated executable, and it recommends python -m pip instead.

The pip documentation uses py -m pip for every Windows example, which avoids the problem entirely.

Step 1: check that pip is there

The pip getting-started guide gives two commands for Windows, and the first confirms that Python runs.

py --version
py -m pip --version

The second line should print a line like “pip X.Y.Z from …” followed by the Python version it belongs to.

If the first command fails, pip is not your problem, so start with our guide to fixing Python not recognized on Windows.

Step 2: use py -m pip

Once the check works, replace every pip command with py -m pip.

TaskCommand from the pip guide
Install a packagepy -m pip install sampleproject
Upgrade a packagepy -m pip install --upgrade sampleproject
Uninstall a packagepy -m pip uninstall sampleproject
Upgrade pip itselfpy -m pip install --upgrade pip

The install command fetches the package from the Python Package Index and ends with “Successfully installed sampleproject” when it works.

The uninstall command asks “Proceed (Y/n)?”, and typing y completes the removal.

The pip guide uses a sample package called sampleproject, so replace that name with the package you want.

Step 3: make the plain pip command work

If you would rather type pip on its own, the Python documentation gives a fix for the install manager.

py install --refresh

This recreates the Start menu shortcuts, registry keys and global aliases, and the documentation says to run it after installing packages if commands are missing.

It also says to make sure the global shortcuts directory is on PATH, and that the command output shows the directory if it is not.

For the steps to add a folder to PATH, see our guide to editing environment variables and PATH in Windows 11.

If you use a virtual environment

The Python documentation asks first whether you activated your virtual environment, because pip and package commands live inside it.

  1. Open a terminal in your project folder.
  2. Run .venv\Scripts\activate.
  3. Run py -m pip --version again.

To create an environment in the first place, the documentation gives the command below, where the path is the folder you want.

python -m venv <env path>

The documentation recommends one virtual environment for each project, which also keeps the commands added by packages available in your session.

With no version requested and an environment active, the default runtime is that environment, so py -m pip then acts on it.

A package installed but its command is not found

The Python documentation lists this as its own symptom.

Its advice is to activate the virtual environment, because new packages do not automatically get global shortcuts and uninstalled packages keep theirs.

For a global install, run py install --refresh so the new command is picked up.

If pip is not installed at all

The pip documentation says pip is usually installed if you work in a virtual environment, use Python downloaded from python.org, or use a Python that was not modified to remove ensurepip.

If py -m pip reports that there is no module named pip, the pip guide gives two Windows routes.

RouteCommand
ensurepippy -m ensurepip --upgrade
get-pip.pyDownload the script from bootstrap.pypa.io/get-pip.py, open a command prompt in that folder, then run py get-pip.py

Try ensurepip first, because it uses the copy that ships with Python.

The Python documentation also notes that the full installer includes pip, while the embeddable package does not.

Check that it worked

Open a new terminal window and run py -m pip --version, which should print a pip version and the Python it runs under.

Then run py -m pip install --upgrade pip to bring pip itself up to date.

If you also need Git for downloading projects, see our guide to installing Git on Windows 11.

Sources

Leave a Reply

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