The error “pip is not recognized as an internal or external command” means Windows cannot find the pip executable in the current directory or in any folder listed in the PATH environment variable. This usually happens after installing Python but before adding its Scripts folder to PATH, or when Python was installed without the “Add to PATH” option. The fix is to locate the Scripts folder where pip.exe lives and add it to your system’s PATH, or reinstall Python with the PATH option enabled.
What Causes the “Pip Not Recognized” Error?
When you type a command in the Command Prompt or PowerShell, Windows searches for that command in the current folder and then in every folder listed in the PATH environment variable. If it doesn’t find an executable named pip.exe in any of those locations, it displays the “not recognized” message.
Common reasons for this:
- Python was installed without checking “Add Python to PATH” during setup.
- Python is installed, but the
Scriptssubfolder (where pip.exe is placed) isn’t in PATH. - You have multiple Python installations, and the one in PATH doesn’t include pip.
- pip was removed or never installed (rare, but possible with some minimal installs).
Note that on Linux and macOS, pip is usually at /usr/bin/pip or /usr/local/bin/pip and the error is different (“pip: command not found”). The “internal or external command” phrasing is specific to Windows.
How to Check If pip Is Installed but Not in PATH
Before changing anything, verify whether pip actually exists on your system. Open Command Prompt and run:
python -m pip --version
If this shows a version number (e.g., pip 24.0 from C:\Python312\Lib\site-packages\pip), pip is installed and working—it’s just not accessible as a bare command. The python -m pip syntax tells Python to run pip as a module, which doesn’t rely on PATH.
If you get “No module named pip”, then pip itself is missing. In that case, run python -m ensurepip --upgrade to install it, or reinstall Python with the default options.
Fix 1: Add Python’s Scripts Folder to PATH (Permanent)
This is the most reliable fix. You need to find the folder that contains pip.exe. It’s usually a subfolder named Scripts inside your Python installation folder. For example:
C:\Python312\ScriptsC:\Users\YourName\AppData\Local\Programs\Python\Python312\Scripts
To locate it, run this in Command Prompt:
where python
That shows the Python executable path. The Scripts folder is in the same directory. For instance, if where python returns C:\Python312\python.exe, then the Scripts folder is C:\Python312\Scripts.
Now add it to PATH:
- Press Win + R, type
sysdm.cpl, and press Enter. - Go to the Advanced tab and click Environment Variables.
- Under User variables (or System variables if you have admin rights), select Path and click Edit.
- Click New and paste the full path to your Scripts folder.
- Click OK on all dialogs.
Close and reopen your terminal. Now pip --version should work.
Fix 2: Use the “python -m pip” Workaround
If you don’t want to modify PATH (or can’t), you can always use python -m pip instead of pip. For example:
python -m pip install requests
This works because Python knows where its own modules are, even if the executable isn’t in PATH. It’s a good temporary solution, but it’s easy to forget the python -m prefix. If you use multiple Python versions, this also ensures you’re installing packages for the exact Python you’re running.
Fix 3: Reinstall Python with “Add to PATH”
If you’re still having trouble, the cleanest fix is to reinstall Python. Download the latest installer from the official Python website, run it, and make sure to check “Add Python to PATH” at the bottom of the first screen. Choose “Install Now” or “Customize installation” and ensure pip is selected (it is by default). After installation, open a new terminal and test pip --version.
This method also refreshes the PATH entries, which can clear up any leftover misconfigurations.
Common Mistakes and Pitfalls
- Using the wrong Python installation: If you have both Python 3 and Python 2, or a Microsoft Store version, PATH might point to a different one. Check with
where pythonandpy --version. - Not restarting the terminal: PATH changes only apply to new terminal windows. If you don’t close and reopen, you’ll still see the error.
- Editing the wrong PATH variable: User PATH is for your account only; System PATH affects everyone. If you add to System PATH, you need admin rights. Both work, but user PATH is safer.
- Mistyping the path: The Scripts folder must be spelled exactly, including uppercase letters if any. Windows paths are case-insensitive, but a missing backslash or a wrong folder name will fail.
- Confusing pip with pip3: On some systems,
pip3is the command for Python 3. If you’re using Python 3 but only havepip3in PATH, trypip3 --version.
Frequently Asked Questions
Why does pip work with “python -m pip” but not as “pip”?
Because python -m pip tells Python to run the pip module from its own library, which doesn’t require the pip executable to be in PATH. The bare pip command requires Windows to find pip.exe in the directories listed in PATH. If the Scripts folder isn’t there, the bare command fails.
I added Python to PATH during installation, but pip still isn’t recognized. Why?
This can happen if you have multiple Python installations. The one that’s first in PATH might not have pip installed. Check where python to see which Python is being used, and then check if that Python’s Scripts folder exists. If not, run python -m ensurepip --upgrade or reinstall that Python with pip selected.
Do I need to restart my computer after changing PATH?
No, but you do need to close and reopen any open Command Prompt or PowerShell windows. The PATH is read when the terminal starts. If you have File Explorer open, it may also need to be restarted to reflect the change.
What if I don’t know where Python is installed?
Run where python in Command Prompt. If that doesn’t work, try py --install-path (for the Python launcher). You can also search for “python.exe” in your Start Menu or in File Explorer. The Scripts folder will be next to it.
Is it safe to edit the PATH variable?
Yes, as long as you only add new entries and don’t delete existing ones. Editing PATH incorrectly can cause other commands to stop working, so be careful. If you’re unsure, use the user PATH instead of the system PATH.
Can I use a virtual environment to avoid this error?
Yes. Create a virtual environment with python -m venv myenv, then activate it with myenv\Scripts\activate. Inside the environment, pip is available directly because the environment’s Scripts folder is automatically added to PATH when activated. This is a good practice for project isolation.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Compressed Zipped Folder Access Denied? Fix It
- IPTV TV Boxes: How to Choose the Right Streaming Device
- Custom Races in Assetto Corsa: Server Setup Guide
- Dueling Grounds Events Schedule: Full Guide
- Evaluating Co-Packaged Optics Switches for AI Data Centers
- RTX 5080 Best Settings for 1440p & 4K Gaming