Related Tags

python
error
command
terminal
cmd

# Err: Python is not recognized as an internal or external command

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.

## Solution

To resolve this error, follow the steps below:

1. Find a folder with the installed Python version as its name in X:\Program Files (where $X$ 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.

2. Open this folder and copy its path.

3. Right-click This PC, then go to Properties => Advanced system settings => Environment variables.

4. In the window that appears when a path variable exists, select it, ​and click Edit; otherwise, click New.

5. In the next dialogue box, click on New and paste the previously copied path of the folder; then, click OK.

RELATED TAGS

python
error
command
terminal
cmd