How to run python files

If you didn't already know, I have a page on this website where I made a game in python/pygame.
The link is here if you want to check it out.
However, when you try to run it, you will likely get an error or get sent to notepad.
This guide aims to guide you through the process of installing python, and running python scripts.
Now lets get started!



This guide is for Windows some parts of the guide may not apply to other computers running linux or mac




First, you can go to the official python website, and find the most recent version of python.
As of writing this, 3.12.8 is the most recent version.
If you want, you can just click here and get the installer for this version.
If you don't want to get that version, click here and find the most recent version of python.



What the download section of a version looks like


Simply scroll down and find the part where it says versions, and click download on one of them.
Afterwards, scroll almost all the way down, and click whichever installer works for you.
After, run the installer, and follow the instructions it gives.
Once it finishes installing, python files should automatically run, instead of opening it in notepad.
If not, right click the python file you want to run, and press "open with" and then "choose another app."
Just scroll through the app list, until you find "Python" then select it, and press always so it always does that.
Hope this helped!



Back To Homepage