The “Python is not recognized as an internal or external command” error is encountered in the command prompt of Windows. The error is caused when Python’s executable file is not found in an environment variable as a result of the Python command in the Windows command prompt.
To resolve this error, follow the steps below:
Find a folder with the installed Python version as its name in
X:\Program Files (where is the drive where Windows is installed; e.g.,
C:\Program Files\Python36). If such a folder does not exist, download and install the latest version of Python here.
Open this folder and copy its path.
Right-click This PC, then go to Properties => Advanced system settings => Environment variables.
In the window that appears when a
path variable exists, select it, and click Edit; otherwise, click New.
In the next dialogue box, click on New and paste the previously copied path of the folder; then, click OK.
View all Courses