Installing python and making your first script
Python is a great programming language, easy to learn and extremely versatile. In this article i’d like explain how to install python as a foundation for future posts.
First we need to download the python installer from the official website.
Once you’ve downloaded the installer you need to do some configuration:
Make sure to select the Add Python 3.9 to PATH option as this will make running your scripts a lot easier. Feel free to either select or deselect Install launcher for all users.
Hit Install Now and let the installer work its magic.
You might want to disable path lenght limit as this might help you later on.
With that out of the way we can start and make our first runnable python script. Make a new file and call it test.py. The .py extension lets our computer know its a python file. Make sure the file isn’t called test.py.txt as that will be a very difficult problem to troubleshoot (speaking from experience).
Open the file and write the following script:
This script will print out “Hello World” 10 times (cliché, i know).
Open up your CMD and navigate to the folder where you saved your brand new Script.
first type python, this will tell the computer you’re going to run a python script. type the name of your program, test in this case and finish it with a .py as thats the full official name of the program. Ill tell you next time how to omit the python and the .py but we’ll stick to the basics for now. If you’re intrested you can read how to do it here
Hit Enter and BAM! you’re a python programmer!