How to Fix “Pip Is Not Recognized As An Internal Or External Command” in Windows 11

If you’re trying to install a Python package and get the error — ‘pip’ is not recognized as an internal or external command, operable program or batch file.

— don’t panic. This is one of the most common problems developers face when setting up Python on Windows, and thankfully, it’s also one of the easiest to fix.

This issue typically means that Windows can’t locate the pip executable — the program responsible for installing and managing Python libraries. Without it, you won’t be able to use commands like pip install numpy or pip install flask.

In this guide, we’ll break down why this happens, what it means, and provide step-by-step solutions to fix the “pip not recognized” error permanently on your Windows system.

What Exactly Does This Error Mean?

When you run the command:

pip install package-name

the system searches for an executable file called pip.exe in the directories listed under the Windows PATH environment variable.

If pip’s folder isn’t included in PATH, or pip wasn’t installed properly, Windows simply says: “pip is not recognized…”

In other words, the command line has no idea where pip.exe is located.

This can happen for several reasons:

  • You installed Python but didn’t check the “Add Python to PATH” option.
  • The Scripts folder (where pip.exe lives) isn’t added to PATH.
  • The Python installer didn’t install pip at all.
  • You have multiple Python installations, and Windows is using the wrong one.
  • Your environment variables were corrupted or modified.

The good news? All of these are fixable with a few simple commands and adjustments.

Fix 1: Verify That Python and Pip Are Installed Correctly

Before changing any settings, make sure Python and pip are actually installed.

  1. Open the Command Prompt.
  2. Type: python --version or: py --version If you get a version number like Python 3.12.1, that’s a good sign.
  3. Next, check pip: python -m pip --version If you see something like pip 24.2 from ..., then pip exists but may not be added to PATH.

If the command returns “No module named pip”, skip to Fix 3 below to reinstall it.

Fix 2: Manually Add Pip to the PATH Environment Variable

If Python is installed but pip isn’t recognized, it’s almost always a PATH problem.

Here’s how to fix it manually:

  1. Open File Explorer.
  2. Navigate to: C:\Users\<YourUser>\AppData\Local\Programs\Python\Python312\ (The folder name may vary depending on your Python version.)
  3. Inside, open the Scripts folder — you should see pip.exe there.
  4. Copy both folder paths: C:\Users\<YourUser>\AppData\Local\Programs\Python\Python312\ C:\Users\<YourUser>\AppData\Local\Programs\Python\Python312\Scripts\
  5. Right-click Start → select SystemAdvanced system settings.
  6. Click Environment Variables → under “System variables,” select Path → click Edit.
  7. Click New and paste both paths above.
  8. Click OK to save your changes.
  9. Restart the Command Prompt and run: pip --version

If it displays a version number, congrats — pip is now working globally!

Fix 3: Reinstall Pip Using the Python Module Command

If pip was never installed or got corrupted, you can reinstall it with a simple command.

  1. Open Command Prompt as administrator.
  2. Type: python -m ensurepip --upgrade This command forces Python to reinstall pip if it’s missing or outdated.
  3. Verify by running: pip --version

If it still doesn’t work, we’ll manually install pip using a Python script next.

Fix 4: Install Pip Using get-pip.py

If pip isn’t working even after reinstalling, you can manually download and install it.

  1. Go to the official pip installer page.
  2. Right-click the page → choose Save As → save it as get-pip.py to your Downloads folder.
  3. Open CMD and navigate to the folder where you saved it: cd %HOMEPATH%\Downloads
  4. Run: python get-pip.py This will install the latest version of pip on your system.

Once the process finishes, type:

pip --version

and confirm that pip is now accessible.

Fix 5: Use the Python Launcher (py) Command Instead

If your system still doesn’t recognize pip globally, you can use Python’s built-in launcher to run pip commands directly:

py -m pip install package-name

This method works even if pip isn’t added to PATH, since it calls pip through the active Python installation.

Example:

py -m pip install requests

This will install the requests library successfully without needing to modify environment variables.

Fix 6: Reinstall Python and Check “Add to PATH”

If nothing else works, it’s best to reinstall Python correctly.

  1. Go to python.org/downloads.
  2. Download the latest stable version (e.g., Python 3.12 or higher).
  3. Run the installer and make sure to check the box:
    ✅ “Add Python 3.x to PATH”
  4. Click Customize installation → ensure pip is checked.
  5. Complete the installation and restart your PC.

Once done, open CMD and check:

pip --version

You should now have both Python and pip fully working system-wide.

Fix 7: Handle Multiple Python Versions (Conflict Issue)

If you’ve installed multiple Python versions (for example, one from the Microsoft Store and another from python.org), Windows may be using the wrong one.

Check which Python installation CMD is using:

where python

and:

where pip

If you see multiple paths, uninstall older or duplicate versions.

You can remove them from:

  • Settings → Apps → Installed apps → Python → Uninstall

Then reinstall the latest version and ensure PATH is set properly.

Fix 8: Update Pip to the Latest Version

Even if pip works, it’s a good idea to keep it updated to avoid compatibility errors.

Run:

python -m pip install --upgrade pip

or:

py -m pip install --upgrade pip

This ensures you’re always using the latest version with all security and performance updates.

Why This Error Keeps Happening

This error often reappears if:

  • You reinstall Python without checking “Add to PATH.”
  • You switch between CMD, PowerShell, or VS Code terminals with different environment paths.
  • Windows updates reset or remove certain system variables.
  • An antivirus or system cleaner deleted your pip files by mistake.

To avoid this in the future:

  • Always verify installation with python --version and pip --version.
  • Keep your Python installation folder consistent (avoid renaming directories).
  • Run Python setup as an administrator for system-wide access.

How to Check Pip Installation via PowerShell

If CMD still gives you trouble, try running the same commands in PowerShell.
For example:

python -m pip list

or:

pip install pandas

Sometimes, PowerShell recognizes PATH changes faster than CMD, especially after reinstallation.

Wrapping Up

The “Pip is not recognized as an internal or external command” error can be annoying, but it’s usually just a simple configuration issue. Once you make sure pip is installed and added to your PATH, everything should run smoothly.

Whether you fixed it by reinstalling pip, adding the correct path, or using the Python launcher, the key takeaway is that pip is essential for managing Python libraries, so setting it up correctly is crucial for every developer.

Now that pip is working, go ahead and install your favorite libraries:

pip install numpy
pip install flask
pip install requests

You’re all set to start building, testing, and automating with Python on Windows — without any “unrecognized command” headaches!

Posted by Arpita

With a background in Computer Science, she is passionate about sharing practical programming tips and tech know-how. From writing clean code to solving everyday tech problems, she breaks down complex topics into approachable guides that help others learn and grow.