---
title: "'pip' is not recognized — fix it on Windows in 5 minutes"
description: "Windows says pip is not recognized as an internal or external command because pip is not on your PATH. Use python -m pip for an instant fix, then repair PATH properly."
url: https://articles.sythra.ai/articles/pip-not-recognized-windows-fix
slug: pip-not-recognized-windows-fix
author: "vaibhavkothari"
author_url: https://articles.sythra.ai/writers/vaibhavkothari
date_published: 2026-08-26T08:26:25.097Z
date_modified: 2026-08-29T10:29:25.265Z
topics: ["Python", "Errors", "Coding"]
reading_time_minutes: 5
publisher: "Sythra"
publisher_url: https://sythra.ai
access: free
language: en
---

# 'pip' is not recognized — fix it on Windows in 5 minutes

> Windows says pip is not recognized as an internal or external command because pip is not on your PATH. Use python -m pip for an instant fix, then repair PATH properly.

Source: https://articles.sythra.ai/articles/pip-not-recognized-windows-fix · Author: vaibhavkothari · Published: 2026-08-26 · Reading time: 5 min · Topics: Python, Errors, Coding

`'pip' is not recognized as an internal or external command, operable program or batch file.`

This message is Windows saying: *"I looked in every folder on my list and there is no program called pip."* It does **not** mean pip is missing. Python ships with pip. Windows just does not know where it lives.

There is a one-line workaround you can use right now, and a permanent fix that takes five minutes. Do both.

## The instant fix

Instead of `pip`, run pip **through** Python:

```bash
python -m pip install requests
```

`python -m pip` means "run the pip module that belongs to this Python". It works even when `pip` is not on the PATH, and it is the command experienced developers use anyway, because it can never install into the wrong Python.

If `python` also fails, jump to Step 3.

## Step 1 — Check what Windows can actually see

Open PowerShell and ask:

```bash
python --version
python -m pip --version
```

Read the result carefully — each outcome points to a different fix:

| Result | Meaning | Go to |
|---|---|---|
| Both print versions | Python is fine, only `pip` is missing from PATH | Step 2 |
| `python` opens the Microsoft Store | Windows app-execution alias is hijacking it | Step 4 |
| `python` is also not recognized | Python is not on PATH at all | Step 3 |
| `No module named pip` | pip is genuinely missing | Step 5 |

## Step 2 — Add the Scripts folder to PATH

pip lives in a folder called `Scripts` next to `python.exe`. Find it:

```bash
python -c "import sys, os; print(os.path.join(sys.prefix, 'Scripts'))"
```

You get something like `C:\Users\You\AppData\Local\Programs\Python\Python312\Scripts`.

Add it permanently:

1. Press `Win`, type **environment variables**, open **Edit the system environment variables**
2. Click **Environment Variables…**
3. Under **User variables**, select **Path** → **Edit**
4. Click **New**, paste the `Scripts` path
5. Click **New** again and paste the folder *above* it too (the one holding `python.exe`)
6. OK out of all three windows

Now **close every terminal and open a new one**. PATH is read when a terminal starts, so old windows keep the old list. Test:

```bash
pip --version
```

## Step 3 — Reinstall Python with the checkbox ticked

If `python` itself is not recognized, the installer was run without the PATH option. Fixing it is easy:

1. Download Python from [python.org/downloads](https://www.python.org/downloads/)
2. Run the installer
3. **Tick "Add python.exe to PATH"** at the bottom of the first screen — this is the step everyone misses
4. Choose **Install Now**
5. Open a brand-new terminal and run `python --version`

Already installed? Run the installer again, choose **Modify**, then **Add Python to environment variables**.

## Step 4 — Turn off the Microsoft Store alias

Windows ships fake `python.exe` and `python3.exe` files that open the Store instead of running Python. They shadow your real install.

1. Press `Win`, type **Manage app execution aliases**
2. Turn **off** the toggles for **python.exe** and **python3.exe**
3. Open a new terminal and try again

## Step 5 — Repair pip itself

Rare, but it happens after a partial install:

```bash
python -m ensurepip --upgrade
python -m pip install --upgrade pip
```

`ensurepip` is a small tool bundled with Python whose only job is putting pip back.

## Step 6 — Prove it works end to end

```bash
python -m pip install requests
python -c "import requests; print(requests.get('https://example.com').status_code)"
```

A printed `200` means Python, pip, and your network are all healthy. You are ready to install anything — including the OpenCV setup from [our virtual mouse project](https://articles.sythra.ai/articles/virtual-mouse-opencv-mediapipe).

## Common mistakes (and fixes)

| Problem | Fix |
|---|---|
| Edited PATH but nothing changed | Open a **new** terminal; PATH is only read at startup |
| Works in PowerShell, fails in VS Code | Restart VS Code completely, not just the terminal panel |
| `Defaulting to user installation` warning | Harmless. It means you are installing without admin rights |
| `Access is denied` | Add `--user`, or use a virtual environment |
| Two Pythons fight each other | Use `py -3.12 -m pip install ...` to pick one explicitly |

## Why python -m pip is the better habit

Even after PATH is fixed, keep using `python -m pip`. On a machine with several Pythons, plain `pip` may belong to a different one — which is exactly how you end up with [No module named 'cv2'](https://articles.sythra.ai/articles/no-module-named-cv2-fix) right after a "successful" install. `python -m pip` removes the ambiguity for good.

```remember
# Remember this
`python -m pip install x` -> always uses the Python that is running
`pip install x` -> uses whatever pip PATH happens to find
---
The error is about PATH, not about pip being missing.
Tick "Add Python to PATH" at install time and none of this happens.
```


## FAQ

### How do I fix 'pip' is not recognized on Windows?

Run `python -m pip install <package>` for an immediate fix, then add Python's `Scripts` folder to your PATH environment variable and open a new terminal so the change takes effect.

### Why is pip not recognized even though Python is installed?

Python was installed without ticking "Add python.exe to PATH", so Windows does not know which folder holds `pip.exe`. The program exists; the shortcut to it does not.

### Where is pip.exe located on Windows?

Inside the `Scripts` folder next to `python.exe`. Print the exact path with `python -c "import sys, os; print(os.path.join(sys.prefix, 'Scripts'))"`.

### What is the difference between pip and python -m pip?

`pip` runs whichever pip Windows finds first on the PATH. `python -m pip` runs the pip belonging to the Python you just invoked, so packages always land in the interpreter you expect.

### Why does typing python open the Microsoft Store?

Windows includes app-execution aliases that redirect `python` to the Store. Disable them under Settings → Manage app execution aliases.

## Next reading on Sythra Articles

- [Your first Python program: say hello in 5 minutes](https://articles.sythra.ai/articles/first-python-hello)
- [venv vs conda vs uv — which one should you use?](https://articles.sythra.ai/articles/venv-vs-conda-vs-uv)
- [No module named 'cv2' — how to fix it](https://articles.sythra.ai/articles/no-module-named-cv2-fix)

## Glossary (terms defined in this article)
- **PATH** (basic) — The list of folders Windows searches when you type a command
