HOLIDAY SALE! Save 50% on Membership with code HOLIDAY50. Save 15% on Mentorship with code HOLIDAY15.

4) Set Up Your Machine Lesson

How to Install Python

6 min to complete · By Martin Breuss

Throughout this course, you'll learn to program in Python 3. There are websites where you can run Python online, but in order to run all the examples and train your skills well, you'll need to install Python on your local computer.

You'll find instructions on how to get set up on the most common operating systems on this page.

How to Install Python on macOS

To install Python on macOS, follow these steps:

  1. Download Python 3 from the official website.
  2. Find the first heading called Python Releases for macOS and click the link for the Latest Python 3 Release - Python 3.x.x. As of this writing, the latest version was Python 3.11.0.

Scroll to the bottom and click the macOS 64-bit installer to start the download.

macOS download page for Python

Once the download has finished, it's time to install Python on your computer. Follow the steps that the installer takes you through. When you're done, a new Finder window will open up showing a folder with the name of the Python version you just installed.

Your installation was successful. You can close the window now. You'll primarily use Python through the terminal in your text editor, VS Code, which you'll install next.

How to Install Python on Ubuntu Linux

If you're on a modern version of Ubuntu Linux, then Python 3 already comes preinstalled. You probably won't have to do anything to get your hands on a working Python interpreter that'll take you through the beginning of this course.

To confirm that you have Python installed, and install it if you haven't, open up a terminal window and type the installation command:

sudo apt install python3

You'll need to enter your user password. The command will either install Python 3 on your machine or otherwise show you a message that indicates that Python 3 is already installed:

Linux terminal windows showing that Python 3 is already installed

If you can see a message similar to this one, then you already have Python 3 installed on your Linux operating system. You can close the window now. You'll primarily use Python through the terminal in your text editor, VS Code, which you'll install next.

How to Install Python on Windows

The quickest way to get started programming in Python with Windows is to go to your Microsoft Store and find the officially supported Python distribution by typing Python into the search bar:

Microsoft Store page for Python

Get the newest version of Python that you can find in the store. At the time of writing these instructions, that version was 3.10:

Microsoft Store page for Python 3.10

Click the Get button to install Python on your computer. When the installation is finished, a Python interpreter window will open up:

Python 3.10 interpreter on Windows

You can type a mathematical expression to confirm that everything works:

>>> 2 + 2
4

Your installation was successful and you can now use Python on your Windows computer. You can close the interpreter window. You can find and open the interpreter again by searching for Python through the Windows search:

Microsoft Search looking for Python

You'll primarily use Python through the integrated terminal of your text editor, VS Code, which you'll install next.

Summary: How to Install Python

You've installed Python on your operating system. Depending on whether you're on macOS, Ubuntu Linux, or Windows, the installation process will look different. After installing Python, it's time to install VS Code, the text editor you'll work with throughout the course.