# How to install Python on your computer

In this lecture I'll guide you through installing Python on your computer. If have already installed Python, feel free to skip to the next lecture!

# On Windows

To install Python, download the latest version of Python from https://www.python.org. At the time of writing, that was Python 3.9.6.

Add to PATH

As you go through the installer, make sure to check "Add Python to PATH".

Once Python is installed, you can execute the program cmd.exe. This is a command-line interface to your computer. Here, just type the word python and that will start the Python program.

At all points during the course, you can always type python name_of_file.py and that will execute the code of a file called name_of_file.py

If you have multiple versions of Python installed, such as a version you installed a while ago, you'll need to use the complete path to Python in order to run it. Usually it'll look something like this:

C:\\Users\\yourname\\AppData\\Local\\Programs\\Python\\Python39-32\\python.exe

# On Mac

To install Python, download the latest version of Python from https://www.python.org. At the time of writing, that was Python 3.9.6.

Once Python is installed, you can execute the program Terminal.app. This is a command-line interface to your computer. Here, just type the word python3.9 and that will start the Python program.

At all points during the course, you can always type python3.9 name_of_file.py and that will execute the code of a file called name_of_file.py