How to execute .py python program on python software? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

How to execute .py python program on python software?

24th May 2019, 11:42 AM
Anil Kumar Rawat
Anil Kumar Rawat - avatar
2 Answers
+ 7
You can either associate .py files with an IDE like e.g. IDLE so that when you double click a .py file, IDLE is started and you can run the script by pressing F5. Or you can run the program via the terminal/console with "python myfile.py"
24th May 2019, 12:07 PM
Anna
Anna - avatar
+ 3
If you have problems whit the python command you can specify the version of python you are using, for example python3 my_game.py
24th May 2019, 3:24 PM
Paolo Torregroza
Paolo Torregroza - avatar