Last modified: Oct 01, 2026

Fix "pip is not recognized" on Windows

You open Command Prompt and type a pip command. Instead of installing a package, you see a red error. It says "pip is not recognized as an internal or external command".

This is one of the most common Python errors on Windows. The good news is that it is easy to fix. In most cases, the problem is just a PATH setting.

This guide explains why the error happens. Then it walks you through every working fix, step by step. It is written for beginners, so you can follow along even if you are new to Python.

What Does the Error Mean?

When you type pip in the terminal, Windows looks for a program with that name. It searches the folders listed in your PATH environment variable.

If pip is not in any of those folders, Windows cannot find it. So it shows the "not recognized" message. This does not mean pip is missing. It usually means Windows does not know where pip lives.

Here is what the error looks like:


C:\Users\YourName>pip install requests
'pip' is not recognized as an internal or external command,
operable program or batch file.

You may also see a similar error for python itself. That is a strong hint that Python is not on your PATH.

Check If Python Is Installed

Before fixing pip, confirm that Python is actually installed. Open Command Prompt and run this command:


python --version

If you see a version number, Python is installed. For example:


Python 3.12.1

If you get an error, Python may not be installed. Download it from the official Python website and install it again.

On Windows, you can also try the py launcher. It often works even when python does not:


py --version

Quick Fix: Use the Python Module Command

You can run pip without typing pip at all. Use Python to call the pip module directly. This works in most cases.


python -m pip install requests

Or with the launcher:


py -m pip install requests

This is a great temporary fix. It tells Python to run pip as a module. If this works, pip is installed. The only problem is that your PATH is not set up.

Fix 1: Add Python and pip to PATH

This is the real fix. You need to tell Windows where to find Python and pip. Follow these steps carefully.

Step 1: Find Your Python Folder

Open File Explorer and go to your Python installation folder. It is usually something like:


C:\Users\YourName\AppData\Local\Programs\Python\Python312\

Inside this folder, you should see python.exe. There is also a Scripts folder. That folder contains pip.exe.

Step 2: Open Environment Variables

Press the Windows key and type "environment variables". Click Edit the system environment variables. Then click the Environment Variables button.

Step 3: Edit the Path Variable

In the top section, find the variable named Path. Select it and click Edit. Now click New and add these two lines one at a time:


C:\Users\YourName\AppData\Local\Programs\Python\Python312\
C:\Users\YourName\AppData\Local\Programs\Python\Python312\Scripts\

Replace the version number with your own. Click OK on every window to save the changes.

Step 4: Restart the Terminal

Close Command Prompt and open it again. The PATH changes only apply to new sessions. Now test it:


pip --version

You should see something like this:


pip 24.0 from C:\Users\YourName\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip (python 3.12)

If you see the version number, the error is fixed. You can now install packages normally.

Fix 2: Reinstall Python and Check the PATH Box

If editing PATH feels risky, reinstall Python. During setup, there is a checkbox at the bottom of the first screen. It says Add Python to PATH.

Check that box before you click Install. This does all the PATH work for you. It is the easiest option for beginners.

After the install finishes, open a new Command Prompt and run pip --version. It should work right away.

Fix 3: Use the Full Path to pip

Sometimes you just need to run one command. You can call pip by its full path instead of fixing PATH.


C:\Users\YourName\AppData\Local\Programs\Python\Python312\Scripts\pip.exe install requests

This works, but it is long and annoying to type. Use it only as a quick workaround.

Fix 4: Ensure pip Is Installed

In rare cases, pip is missing from your Python setup. You can install it using the built-in module ensurepip.


python -m ensurepip --upgrade

This command installs or upgrades pip. After it runs, try pip --version again.

Common Mistakes to Avoid

Many users make small mistakes that keep the error alive. Watch out for these:

First, do not forget to restart the terminal. PATH changes need a fresh window. Second, check for typos in your PATH entries. A missing backslash can break everything.

Third, make sure you edit the user Path and not just the system Path. Both can work, but the user Path is safer. Fourth, if you use multiple Python versions, add the correct Scripts folder for the version you want.

Finally, watch out for spaces in folder names. If your username has a space, wrap the path in quotes when you type it manually.

How to Verify Everything Works

After any fix, run these two commands to confirm success:


python --version
pip --version

Both should print version numbers. Then try a real install to be sure:


pip install requests

If the package downloads and installs, you are done. The error is gone for good.

Conclusion

The "pip is not recognized" error on Windows is almost always a PATH problem. Windows simply cannot find the pip program. The fastest test is to run python -m pip instead of pip.

For a permanent fix, add your Python and Scripts folders to the PATH variable. Or reinstall Python and check the "Add Python to PATH" box. Both methods solve the issue for good.

Once fixed, you can install any package with a simple pip command. Take a few minutes to set up PATH correctly. It will save you hours of frustration later.