No history yet

Python Installation

Installing Python

Before you can start writing Python code, you need to install it on your computer. Think of this as teaching your computer to speak the Python language. The program you'll install is called the Python interpreter. It's what reads your code and carries out your instructions.

The best place to get Python is from its official source: python.org. Head to the downloads section and grab the latest stable version. The website is usually smart enough to suggest the correct download for your operating system, whether you're on Windows, macOS, or Linux.

Lesson image

Run the installer file you've downloaded. The process is straightforward, but there's one crucial step for Windows users.

On Windows, make sure you check the box that says "Add Python to PATH" during installation. This simple click makes it much easier to run Python from your computer's command line.

Once the installer finishes, you have Python! You can verify it's working by opening your computer's command line (Terminal on Mac/Linux, Command Prompt or PowerShell on Windows) and typing python --version. If it prints a version number, you're all set.

Your Coding Workspace

You can write Python in a simple text file, but most developers use a special tool to make their lives easier. This tool is called an Integrated Development Environment, or IDE.

IDE

noun

A software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools, and a debugger.

An IDE is like a supercharged text editor designed specifically for coding. It can highlight your code in different colors to make it more readable, point out simple errors before you even run your program, and help you fix problems when things go wrong. For beginners, a simple, friendly IDE is best.

We recommend Thonny, an IDE made for learning Python. It has a clean, uncluttered interface and comes with Python built-in, so you don't have to worry about complex configurations. It also has a fantastic debugger that shows you exactly how your code is running, step by step.

Lesson image

To get it, just visit the Thonny website (thonny.org) and download the version for your operating system. The installation is as simple as the Python one. Once installed, open it up. You'll see a main area for writing your code and a "Shell" area at the bottom where the output will appear. You're now ready to write your first program.

Let's check your understanding of the setup process.

Quiz Questions 1/5

What is the primary function of the Python interpreter?

Quiz Questions 2/5

What is the official, recommended source for downloading Python?