How to Fix ‘Pip‘ is Not Recognized as an Internal or External Command

Pip, also known as “PIP Installs Packages,” is a package organization system to install and operate Python software packages. Yes, it’s “Installs” and “Packages” with an “s.” It’s typically used for Python Package Index packages.

How to Fix ‘Pip‘ is Not Recognized as an Internal or External Command

When installing Python packages, many users report receiving the message “‘pip’ is not recognized as an internal or external command” and aren’t sure how to troubleshoot. If you’re seeing this error, read on for tips on how to fix it.

The Causes for ‘Pip ‘is Not Recognized as an Internal or External Command Operable Program or Batch File

Let’s look at the two most common reasons for this error:

Reason #1: The Pip Install is Not in the System Variable

For Python commands to run from a Windows Command Prompt, the path of your pip install will need to be added to your “PATH” system variable. It should be added automatically if you obtained Python via the installation file.

Reason #2: The Installation Was Not Added to Your PATH or System Variables

If you’ve manually added the path, the problem could be a typo. One missing semicolon or an extra space somewhere will produce an error.

How to Fix ‘Pip ‘is Not Recognized as an Internal or External Command in Windows 10 or Visual Studio Code

If you see this error message when working in Windows or with Visual Code, it usually means a problem exists with the Python installation or the PATH has not been set correctly. Try the following tips to fix the issue:

Fix 1: Ensure Pip Was Added to Your PATH Variable

If you’re confident that pip got added to the PATH variable, move on to “Fix 3.” If not, continue here.

  1. Press “Windows key + R.” to open the “Run” dialog box.
  2. Type”cmd"and press “Enter.”
  3. For a list of all the locations added to your PATH variable, type echo %PATH% without quotes into the command prompt, then press “Enter.”
  4. The path was successfully added to the PATH variable if you find something like “C:\Python39\Scripts” (with the number depending on your Python version).

If pip hasn’t been added, try the next fix.

Fix 2: Add Pip to the PATH Environment Variable

There are two ways to add pip to the PATH environment variable—System Properties and the Command Prompt.

How to Add Pip to PATH Environment Variable using System Properties

  1. Open the “Run” dialog box by pressing the “Windows key + R.”
  2. Type insysdm.cpl and press “Enter” to access “System Properties.”
  3. Select the “Advanced” tab, then click “Environment Variables.”
  4. Go to the “System variables” section and select “Path,” then click the “Edit” button at the bottom.
  5. Click “New,” then add your pip installation path” followed by “Enter,” and then select “OK” to save it and close the window. The default location is: “C:\Python##\Scripts” with actual numbers, but your location and file version may differ.
  6. Once the path has been added, restart Windows (IMPORTANT), open a new command window, then try to install a pip package to see whether the problem was solved.

How to Add Pip to PATH Environment Variable using the Command Prompt

  1. Press “Windows key + R.” to launch the “Run” dialog box.
  2. For a new command prompt window, type cmd"and then hit “Enter.”
  3. Type the following command (with your actual path following the semicolon) and press “Enter” to run it:
    setx PATH "%PATH%;C:\Python39\Scripts"

Fix 3: Open the Python Package Without Adding the Pip Variable

Follow these steps to open Python install packages in CMD without adding the pip variable:

  1. Press the “Windows key + R” to open the “Run” prompt.
  2. Type”cmd"and press “Enter” to open the Command Prompt.
  3. Enter the following command for Python 3 (with the package name that uses pip), then press “Enter” to run it:
    py -m pip3 install "package name"

Fix 4: Ensure Pip is Included in the Installation

Some Python installers exclude pip from the default installation. You can fix this by changing the Python installer to include pip, and here’s how:

  1. Press the “Windows key + R” to open the “Run” prompt.
  2. Type appwiz.cpl and press “Enter.”
  3. In the “Program and Features” window, right-click “Python” and choose “Change.”
  4. Select “Modify.”
  5. In “Optional Features,” check the “pip” box and press “Next.”
  6. In the “Advanced Options” window, ensure “Add Python to environment variables” is checked.
  7. To apply the changes, click “Install.”
  8. When the installation is complete, open “Command Prompt” and verify whether you can install a Python package that uses pip without receiving the error.

If you still see the error, head to the last section of this article for steps to uninstall and reinstall Python.

Reinstall Python to Fix ‘Pip’ is Not Recognized as an Internal or External Command

This error usually means a problem with the Python installation exists, or the system variable PATH is not set up correctly. Try reinstalling Python and all its components to fix the problem. The easiest way is via the Python executable installer. Here’s how to do this:

  1. Press “Windows key + R” to open the “Run” dialog box.
  2. Type appwiz.cpl to get to the “Programs and Features” window.
  3. Scroll down the installed programs list to find the Python installation, NOT the launcher.
  4. Right-click it and select “Uninstall,” then follow the instructions.
  5. Once Python is removed, restart your computer (IMPORTANT) and download the latest Python installer for your OS.
  6. Execute “python-3.##.#-amd64.exe” (or whatever installer you downloaded) by double-clicking the file or using the Command Prompt.
  7. Ensure “Add Python 3.## to PATH” is checked at the bottom, then choose “Customize Installation.”
  8. In the “Optional Features” section, ensure the “pip” option is checked, then click “Next.”
  9. The default location can be left as is, but ensure “Add Python to environment variables” is checked, then click “Install.” You can also check off “Install Python 3.xx for all users” if desired.
  10. Once the installation is complete, install a Python 3 package that uses pip to see if the installation process works by typing the following:
    py -m pip install "Project Name Here"

Pip is Now Recognized

The “‘pip’ is not recognized as an internal or external command” error message is a common scenario. The cause usually boils down to the path of the pip install being unavailable or being added incorrectly to the system variable PATH. You can manually add it via Command Prompt or System Properties, change the Python install to include pip, or uninstall and reinstall Python and ensure the “pip” option and adding it to environmental variables are checked.

Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.