-2

My computer has windows 8 and I get this error when I run a code; [Running] python -u "c:\Users\SCS\Desktop\test.py" 'python' is not recognized as an internal or external command, operable program or batch file. It's in the VS code.

I entered a function; Print("Hello World!") for just testing and in the "Output", I got this error; My computer has windows 8 and I get this error when I run a code; [Running] python -u "c:\Users\SCS\Desktop\test.py" 'python' is not recognized as an internal or external command, operable program or batch file.

I expected the output but I got this error.

  • You don't have python properly installed on your computer: https://www.python.org/downloads/windows/ – spydon Jun 29 '23 at 11:25

1 Answers1

0

To resolve this error, follow the steps below:

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.

Open this folder and copy its path.

Right-click This PC, then go to Properties => Advanced system settings => Environment variables. enter image description here

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

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

Reference:Click Here

Dhanush
  • 16
  • 4