Solve PIP is Not Recognized as an Internal or External Command

In this guide, you’ll see how to solve the following error:

‘pip’ is not recognized as an internal or external command, operable program or batch file.

More specifically, you’ll see two methods to solve this error:

  1. Via the installation of a recent version of Python
  2. Manual entry of the paths (if you don’t want to download a new Python version)

Method 1: Install a recent version of Python

To start, download a recent version of Python by going to python.org.

Then, click on the downloaded file to start the installation, and check the box to Add Python to PATH at the bottom of the setup screen:

Add python.exe to PATH

Finish the installation, and the problem would be solved.

Method 2: Manually enter Python to the Path

Alternatively, you can solve the “pip is not recognized” error by manually adding Python to the Path.

To start, navigate to the “Environment Variables” screen in Windows:

  • Type “Edit the system environment variables” in the Windows search bar and select the result
  • Then click on “Environment variables…” to open the Environment Variables screen

In the “System variables” section, look for the “Path” variable:

System variables

OS
Path
PATHEXT

New…   Edit…

If the “Path” variable exists

If the “Path” variable exists, select it, and then click on “Edit…

System variables

OS
Path
PATHEXT

New…   Edit…

Then, in the “Edit environment variable” screen click on “New” to add the Python application path, which is the folder where you originally installed Python:

Edit environment variable

  New

Edit

You can find the Python application path by following these steps:

  • Type “Python” in the Windows Search Bar
  • Right-click on the Python App, and then select “Open file location
  • Right-click again on the Python shortcut, and then select “Open file location

Here is an example of a Python application path:

C:\Users\Ron\AppData\Local\Programs\Python\Python312

Also add the Python “Scripts” path (by clicking “New” again). The Scripts folder is located within the Python application path:

C:\Users\Ron\AppData\Local\Programs\Python\Python312\Scripts

Press “OK to save your work.

Edit environment variable

C:\Users\Ron\AppData\Local\Programs\Python\Python312 C:\Users\Ron\AppData\Local\Programs\Python\Python312\Scripts

OK   Cancel

Don’t forget to press “OK again so that the changes will get implemented.

The error would then be solved.

If the “Path” variable DOES NOT exist

If the “Path” variable doesn’t exist, then click on “New…

System variables

OS

New…   Edit…

You should then see the New System Variable box, where you can add/edit variables:

Variable name:
Variable value:

Before you type any values, you’ll need to locate the relevant Python paths. The paths that you’ll need to get are:

(1) The Python application path:

  • Type “Python” in the Windows Search Bar
  • Right-click on the Python App, and then select “Open file location
  • Right-click again on the Python shortcut, and then select “Open file location

Here is an example of a Python application path:

C:\Users\Ron\AppData\Local\Programs\Python\Python312

(2) The Python Scripts path. The Scripts folder is located within the Python application path.

For example:

C:\Users\Ron\AppData\Local\Programs\Python\Python312\Scripts

After you obtained those paths, fill the New System Variable box that you saw earlier:

  • For the Variable name, type “Path
  • For the Variable value, paste the full Python application path, then add semicolon (as highlighted in yellow below), and finally paste the Python Scripts path.

For our example:

Variable name: Path
Variable value: C:\Users\Ron\AppData\Local\Programs\Python\Python312;C:\Users\Ron\AppData\Local\Programs\Python\Python312\Scripts

Press “OK” and you would then see your new Python Path under the “System variables” section. Don’t forget to press “OK” again so that the changes will get implemented.

You just added Python to the Path, and the error would be solved.

Perform a test (optional)

Go to the Command Prompt and type the following command to check the version of PIP:

pip --version

Once you press enter, the command would work, and you won’t see the error that pip is not recognized:

pip 23.2.1

Leave a Comment