How to fix 'Pip' is not recognized as an internal or external command

Who I am
Matthew M. White
@matthewmwhite
Author and references

Pip Installs Packages (“pip”) is a package organization system for installing and running Python software packages. It is typically used for Python Package Index packages.

When installing Python packages, many users report getting the message "'pip' is not recognized as an internal or external command" and don't know how to fix the problem. If you see this error, read on for tips on how to fix it.


"Pip" is not recognized as an executable program or batch file by internal or external command

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


Pip install not in system variable

For Python commands to run from a Windows command prompt, the path to your pip installation will need to be added to your system PATH variable. It should be added automatically if you installed Python via the installer file.

The installation was added to your PATH incorrectly

If you added the path manually, the problem could just be a typo. A missing semicolon before the new path or an extra space somewhere will produce an error.

'Pip' is not recognized as an internal or external Windows 10 command

Try the following fixes to resolve the issue on Windows 10:

Fix 1: Make sure Pip has been added to your PATH variable

If you're sure it's been added, skip to fix 3.

Here's a quick way to check:

  1. Open the “Run” dialog box by pressing Windows key + R.
  2. Type "cmd" and press "Enter." " 
  3. For a list of all locations added to your PATH variable, type “echo %PATH%” in the command prompt, then press “Enter”.
  4. If you find a path like "C:Python39Scripts" (depending on your version of Python), the path has been added to the PATH variable.

If pip was not added, try the next fix.



Fix 2: Add Pip to PATH environment variable

Here's how to manually add pip to the PATH environment using the Windows GUI and command prompt. Once the path is added, open a new command window and try installing a pip package to see if the issue has been resolved.

Add pip to the PATH using the Windows GUI:

  1. Open the “Run” dialog box by pressing Windows key + R.
  2. Type “sysdm.cpl” and press “Enter” to access “System Properties”.
  3. Select the “Advanced” tab, then “Environment Variables”.
  4. Go to "System Variables" and select "Path".
  5. Click on the “Edit” button.
  6. Click "New" to add pip installation path. The default location is: "C:users"your-username"AppDataProgramsPythonPython39" for Python 3.9.

Add pip to the PATH using CMD:

  1. Launch the “Run” dialog box by pressing Windows key + R.
  2. For a new command prompt window, type “cmd“, then press “Enter”.
  3. Type the command “setx PATH “%PATH%; C:Python39Scripts" and press Enter to run it.

Notes: If you installed Python in a different location, change the path after '; " Consequently.

Fix 3: Open Python package without adding Pip variable

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

  1. Press Windows key + R to open “Run”.
  2. Type "cmd" and press "Enter" to open the command prompt.
  3. Enter the command “python -m pip install (package name)” and run it.

Fix 4: Make sure Pip is included in the installation

Some Python installers exclude pip from the default installation. You can fix this problem by modifying the Python installation to include pip, and here's how:



  1. Press Windows key + R to open “Run”.
  2. Type “appwiz.cpl” and “Enter. " 
  3. In “Program and Features”, right-click on “Python” and click on “Edit”.
  4. Select "Edit".
  5. In "Optional Features", check the "pip" box and click "Next".
  6. To apply the changes, click "Install".
  7. Once the installation is complete, open a CMD window to check if you can install a Python package without receiving the error.

If you still see the error, head to the last section of this article to learn how to uninstall and reinstall Python 3.9.

'Pip' is not recognized as an internal or external command Visual Studio Code

If you see this error message when working with Visual Code, it usually means there is a problem with the Python installation or the PATH was not set correctly. Try the following tips to resolve the issue:

Fix 1: Make sure 'Pip' is added to your PATH variable

If you are sure the pip was added, go to fix 3.

To verify that pip has been added to your PATH variable:

  1. Press Windows key + R to open “Run”.
  2. Type "cmd" then press "Enter" for the command prompt.
  3. For a list of locations added to your PATH variable, type "echo %PATH%" and press "Enter." " 
  4. Seeing a path like "C:Python39Scripts" means the path has been added to the PATH variable.

If pip has not been added, try one of two methods to add it:



Fix 2: Add Pip to PATH environment variable

Follow the next steps to manually add pip to the path environment using the Windows GUI or CMD. Once the path is added, open a new CMD window and try installing a pip package to see if the issue is resolved.

Add pip to the PATH using the Windows GUI:

  1. Open the “Run” dialog box by pressing Windows key + R.
  2. Type “sysdm.cpl” and press “Enter” to access “System Properties”.
  3. Select the “Advanced” tab, then “Environment Variables”.
  4. Go to "System Variables" and select "Path".
  5. Click on the “Edit” button.
  6. Click "New" to add pip installation path. The default location is: "C:users"your-username"AppDataProgramsPythonPython39" for Python 3.9.

Add pip to the PATH using CMD:

  1. Launch the “Run” dialog box by pressing Windows key + R.
  2. For a new command prompt window, type “cmd“, then press “Enter”.
  3. Type the command “setx PATH “%PATH%; C:Python39Scripts" and press Enter to run it.

Fix 3: Open Python package without adding Pip variable

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

  1. Open a "Run" dialog box.
  2. Type "cmd" and press "Enter" to open the command prompt.
  3. Enter the command “python -m pip install (package name)” and run it.

Fix 4: Make sure Pip is included in the installation

Some Python installers omit pip from the default install. You can fix this problem by modifying the Python installation to include pip, and here's how:

  1. Press Windows key + R to open “Run”.
  2. Type “appwiz.cpl” and “Enter”.
  3. In "Program and Features", right-click "Python" and click "Edit".
  4. Select "Edit".
  5. In "Optional Features", check the "pip" box and click "Next".
  6. To apply the changes, click "Install".
  7. Once the installation is complete, open a CMD window to check if you can install a Python package without receiving the error.

If you still see the error, head to the last section of this article to learn how to uninstall and reinstall Python 3.9.

'Pip' is not recognized as a Python 3.9 internal or external command

This error usually means that there is a problem with the Python installation or that the PATH system variable is not set correctly. Try reinstalling Python and all of its components to resolve the issue. The easiest way is to use the Python executable installer. Here's how:

  1. Open a "Run" dialog box.
  2. Run "appwiz.cpl" to access "Programs and Features".
  3. Scroll down to the list of programs to find the Python installation.
  4. Right-click on it and select "Uninstall", then follow the instructions.
  5. Once Python is uninstalled, restart your computer.
  6. Download the latest Python Installer for your operating system.
  7. Run the installer file and make sure the “Add Python to PATH” box is checked.
  8. Select “Customize Installation”.
  9. Under "Optional Features", make sure "pip" is checked, then click "Next".
  10. The default location can be left as is. Click "Install".
  11. Once the installation is complete, you should be prompted to restart your computer.
  12. After your computer restarts, try installing a Python package again.

Pip is now recognized

The error message "'pip' is not recognized as an internal or external command" is common. The cause is usually because the pip installation path is not available or has been incorrectly added to the system variable path.

There are several ways to solve this problem. You can add it manually via the Windows GUI or CMD, modify the Python installation to include pip, or uninstall and reinstall Python to make sure the "pip" options are checked.

Were you able to recognize the pip? What did you do to solve the problem? Tell us in the comments section below.

Audio Video How to fix 'Pip' is not recognized as an internal or external command
add a comment of How to fix 'Pip' is not recognized as an internal or external command
Comment sent successfully! We will review it in the next few hours.