0

python error

The image above shows that there is some error. I don't understand the error here as I already have Python installed. The same error occurs when I open a file using 'python filename.py'. How do I fix this?

stovfl
  • 14,998
  • 7
  • 24
  • 51
Aryamaan Goswamy
  • 319
  • 1
  • 2
  • 16

1 Answers1

5

you need to add Python in Environmental Variables in Windows ;)

Follow this here or check the Python manual on the official page here

Here also a full screen to follow: enter image description here

where the path should be your python's Script folder considering the path if you change or use a custom installation. If you install through the .exe tool it usually allows you configure this on install (or during install).

oetoni
  • 3,269
  • 5
  • 20
  • 35
  • 1
    python.exe is located in the base installation directory, not the "Scripts" subdirectory -- except in a venv virtual environment. I know it's silly to require both directories in `PATH`. It's also silly that the directory is named "Scripts" instead of "bin". These quirks are legacies from the original port to Windows NT in the 1990s. – Eryk Sun Nov 11 '18 at 15:02
  • @eryksun you are more than right! :) I wanted a very fast screen shot just to illustrate the location and thus I simply took the one on my laptop – oetoni Nov 11 '18 at 22:50