Py programs don't run | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Py programs don't run

In the idle, in python shell I open a New File, write a program and save it. When I open it (double click) , a window seems to open but closes immediately. I tried opening the file in cmd with the command python (program file) , it gives 'python' is not recognized as an internal or external command, operable program or batch file. Also in the program I have an infinite loop which breaks with a users input, so I think it's not an interpretation problem like it was suggested in similar questions

20th Jun 2017, 2:15 PM
Vaggelis Kalogirou
1 Answer
+ 1
Usually when you get the python is not recognised as an internal or external command message it means that python has not been added to your path. If you find the install location of the version of python that you're using and in cmd write the full path and then the file it should run. You should add the path to python to your PATH variable. You can Google how to do this for your system.
20th Jun 2017, 3:12 PM
ChaoticDawg
ChaoticDawg - avatar