Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

python
error
command
terminal
cmd

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

Educative Answers Team

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.

svg viewer

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 XX 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
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring