Last Updated on February 25, 2024 by Mathew Diekhake

I have recently updated my version of the Python programming language and am getting the “Python is not recognized as an internal or external command” error. How do I solve this? Resolution:

The following tutorial demonstrates how to fix the ‘Python’ Is Not Recognized as an Internal or External Command, Operable Program or Batch File error.

Method One: How to fix “Python is not recognized as an internal or external command” Error by Editing Path

You may need to edit the path of the file’s location on your operating system. If using Windows for instance, you may need to open File Explorer and navigate to C:\Program Files\ where Python was installed on the drive, and copy and paste its path in File Explorer so it matches up with the path in Environment variables. Here is how to do that:

1. Navigate to Start > File Explorer > C:// > Program File > Python and open the folder.

2. Copy the Python folder’s path from File Explorer’s address bar.

3. Right-click on This PC and navigate to Properties > Advanced system settings > Environment variables.

4. From the path variable’s window, click Edit.

5. Paste the path you copied earlier and then click OK.

Method Two: How to fix “Python is not recognized as an internal or external command” Error by Replacing “Python” with “Py”

If you are typing the word “Python” in the command line, this error may be solved by using “Py” instead. Here is an example of what I mean:

Method Three: How to fix “Python is not recognized as an internal or external command” Error via Advanced Options on the Installer

This problem may be due to the boxes you had checked on the Python installer’s Advanced Options menu. In particular, you want to make sure to check the box “Add Python to environment variables.” Additionally, you want to modify the current installation rather than install a new one.