Skip to content
New guide: build a RAG chatbot over your own docs →

How to Fix ‘Pip Is Not Recognized’ on Windows 11 (5 Working Fixes)

Fix the pip not recognized error on Windows 11 with five practical solutions, including Python commands, PATH fixes, and reinstall tips.

How to Fix 'Pip Is Not Recognized' on Windows 11 (5 Working Fixes)

Seeing the error “pip is not recognized as an internal or external command” when installing Python packages on Windows 11? This usually means Windows cannot locate pip, Python’s package installer, even if Python itself is installed correctly. The good news is that most cases can be fixed without reinstalling Windows, changing complicated system settings, or downloading unofficial installation scripts.

Quick Answer: To fix “pip is not recognized” on Windows 11, open Command Prompt and run py -m pip –version. If that works, use py -m pip install package_name instead of pip directly. If pip is missing, try py -m ensurepip –upgrade. Otherwise, check your Python installation, correct your PATH environment variable, or reinstall Python using its official installer.

Why Is Pip Not Recognized on Windows 11?

Pip is the standard package installer used to download and manage Python packages from the Python Package Index (PyPI). When you enter a command such as pip install requests, Windows searches directories listed in its PATH environment variable to locate the pip executable.

If the executable cannot be found, Command Prompt displays an error indicating tha

Fix 1: Use Py -M Pip Instead of Pip Directly

According to the Python Packaging User Guide, Windows users can run pip through the Python interpreter using the py -m pip command. This is often more reliable than calling pip directly.

Open Command Prompt by pressing Windows + R, entering cmd, and pressing Enter. You can also use Windows Terminal or PowerShell.

Run these three commands separately:

  • py –version to confirm Python is available
  • py -m pip –version to check if pip is available to Python
  • py -m pip install requests to test installing a package

Fix 3: Add Python Scripts Directory to PATH

If py -m pip –version works but typing pip –version still fails, Windows may not know where the pip executable is located.

The PATH environment variable contains directories that Windows searches when you enter commands. Adding the correct Scripts directory allows Windows to locate pip.exe directly.

Run py -c “import sys; print(sys.executable)” to display the selected Python executable location.

Then run py -m pip –version to identify the pip module’s installation directory. A traditional Python installation might use a path resembling C:\Users\YourName\AppData\Local\Programs\Python\Python314\.

Its Scripts directory would typically be C:\Users\YourName\AppData\Local\Programs\Python\Python314\Scripts\.

These are examples, not universal locations. Python install manager, Microso

How to Verify Pip Is Working Correctly

Once you apply a fix, perform three checks before returning to your project.

  1. Version check: Run py -m pip –version to confirm pip is associated with your selected Python interpreter.
  2. Installation check: Run py -m pip install requests to install a commonly used HTTP library.
  3. Import check: Run py -c “import requests; print(requests.__version__)” to verify the interpreter can import the installed package.

Within an activated virtual environment, use python instead of py for these checks to target that environment explicitly.

If installation succeeds but the import fails, you may have installed the package into a different interpreter. Compare the interpreter and pip locations before reinstalling anything.

Common Mistakes That Can Make the Error Return

Using a different Python interpreter: Running pip through one installation while executing scripts with another can produce missing-module errors. Always check which interpreter is selected.

Forgetting to restart the terminal: Existing shells may retain an older PATH value after changes. Open a fresh terminal before troubleshooting again.

Installing everything globally: Project dependencies can conflict when installed into a shared environment. Prefer virtual environments for application development.

Using administrator privileges unnecessarily: Most ordinary Python projects do not require an elevated terminal. Avoid administrator-level installation commands unless there is a specific reason.

For readers beginning their development journey, our guide to start programming in 2026 explains the fundamentals, tools, and practice projects worth learning next.

If you are still deciding which language to study, our Python vs JavaScript comparison can help you choose based on your goals.

Frequently Asked Questions

1. Why does Windows say pip is not recognized even though Python is installed?

The most common reason is that Windows cannot locate pip.exe through the PATH environment variable. Python may be installed correctly, while its Scripts directory is missing from PATH. Try py -m pip –version first. If that works, you can install packages without changing PATH or reinstalling Python.

2. How do I install pip on Windows 11 if it is missing?

Open Command Prompt and run py -m ensurepip –upgrade if your Python interpreter does not include pip. Then verify it with py -m pip –version. If ensurepip is unavailable, check your Python installation method and repair or reinstall using official Python distribution tools rather than downloading unofficial scripts.

3. How do I add pip to PATH on Windows 11?

Find the Scripts directory associated with your Python interpreter, then open “Edit environment variables for your account” in Windows Search. Edit the user Path variable and add that directory as a new entry. Restart your terminal and run pip –version. Paths vary, particularly with modern Python install manager installations.

4. Why does pip work in Command Prompt but not in VS Code?

Visual Studio Code may be using a different Python interpreter or an integrated terminal that inherited older environment variables. Restart VS Code, select the correct interpreter through the Python extension, and check the integrated terminal. Running python -m pip –version helps determine whether the selected interpreter has pip available.

5. Can I use py -m pip instead of pip permanently?

Yes. Running py -m pip install package_name invokes pip through the Python interpreter, so the standalone pip executable does not need to be available on PATH. If py is unavailable but python works, use python -m pip. This approach is often preferable when multiple Python installations are present.

Conclusion: Start With the Simplest Fix

The “pip is not recognized” error on Windows 11 is usually a command discovery or Python environment problem, not a serious operating system issue. Start with py -m pip –version, because it often works immediately without modifying your installation.

If pip is genuinely missing, use ensurepip. If only the standalone command fails, check PATH. Repair Python only when simpler troubleshooting does not resolve the issue.

For ongoing development, use virtual environments to keep dependencies organized and prevent interpreter confusion. The key takeaway is simple: run pip through the Python interpreter whenever possible, then verify that packages install into the environment your project actually uses.

ft Store, virtual environment, and custom installations may use different directories.

Use the user-level PATH when possible rather than modifying system-wide settings. Do not remove existing entries or replace the entire PATH value.

When using the current Python install manager, the recommended configuration may rely on its command aliases instead of traditional Scripts directories. Check the selected installation before making changes.

Run pip –version. You should see a version number and an installation location.

If it still fails, run where pip in Command Prompt to see whether Windows can locate pip.exe. Also check whether another Python installation appears earlier in PATH.

Visual Studio Code may need to be restarted because its integrated terminal inherits environment settings from the application process.

Fix 4: Repair or Reinstall Python

If both Python and pip behave inconsistently, repairing the installation may be easier than tracing several broken configuration settings.

Python’s Windows installation experience has changed. The Python install manager 26.0, released in February 2026, supports managing Python runtimes and is available through the Microsoft Store and official Python distribution channels.

Do not automatically uninstall every Python version on your computer. Existing projects, IDE configurations, and automation scripts might depend on particular interpreters.

If Windows opens the Microsoft Store instead of running Python, check App execution aliases in Windows Settings. Conflicting aliases or multiple Python installations can cause the wrong command to execute.

Only remove installations after identifying which ones are safe to replace.

Fix 5: Use Virtual Environments for Projects

A virtual environment keeps project dependencies separate from other Python applications. It also reduces confusion when different projects require different package versions.

This is particularly useful for developers using Visual Studio Code, PyCharm, FastAPI, Django, or data science libraries.

Create one with py -m venv .venv, then activate it. On Command Prompt, use .venv\Scripts\activate.bat.

If you use PowerShell, activation is usually performed with .\.venv\Scripts\Activate.ps1. On systems with restrictive execution policies, PowerShell may prevent the activation script from running.

You can avoid changing execution policies by invoking the environment’s Python directly, such as .\.venv\Scripts\python.exe -m pip –version.

The Python Packaging User Guide recommends virtual environments to keep package dependencies isolated. This avoids conflicts between unrelated projects and makes dependency management more predictable.

If the final command displays a pip version and installation location, pip is already available to that Python interpreter. You probably only need Fix 1.

If Python itself is not recognized, check whether Python is installed before changing pip settings. On a computer with multiple installations, the py list command can help identify available Python runtimes when using the modern Python install manager.

This is the fastest solution for many Windows 11 users because it does not require editing environment variables or reinstalling software.

The -m argument instructs Python to execute a module as a program. This allows Python to locate its own pip installation without requiring the standalone pip command to be on PATH.

For installations where the python command works but py does not, try python -m pip –version instead.

The Python 3.14 documentation also describes specifying an interpreter version on Windows, such as py -3.14 -m pip install requests. This is particularly useful when several Python versions are installed.

Result: If packages install successfully, you can continue using this method permanently. Making the standalone pip command work is optional.

Fix 2: Install or Repair Pip With Ensurepip

If Python runs correctly but reports “No module named pip,” the pip module may be missing from that interpreter.

Python includes a module called ensurepip that can bootstrap pip into supported Python environments without requiring an external download.

Run py -m ensurepip –upgrade in Command Prompt, then verify with py -m pip –version.

The ensurepip command installs or updates pip using components bundled with Python. It does not necessarily install the newest pip release available online, which is why the final upgrade command is useful.

Python’s documentation identifies ensurepip as a potential solution when pip is not installed. However, certain specialized Python distributions may not include it.

Check that you are running a supported standard Python installation rather than an embedded or restricted distribution. If the module is unavailable or reports missing installation components, continue to Fix 4.

Avoid downloading random pip installation scripts from forums. Official Python installation and packaging mechanisms are safer and easier to maintain.

t pip is not recognized as a command. PowerShell may instead report that the term “pip” is not recognized as a cmdlet, function, script file, or executable program.

Common causes include:

  • Missing PATH entry: Python’s Scripts directory is not available in your environment variable.
  • Incomplete Python installation: Pip was not installed or is unavailable in the selected Python environment.
  • Multiple Python versions: The pip command points to a different installation than the Python you are using.
  • Corrupted installation: Python files were moved, deleted, or modified after installation.