Installing Python & Setting Up the Environment
Before you can run any Python code, Python itself needs to be installed on your machine — it isn't built into most operating systems the way a text editor is. The official installer comes from python.org and works on Windows, macOS, and Linux, though many Linux distributions and Macs already ship with some version of Python pre-installed.
Once installed, you interact with Python through a terminal (Command Prompt or PowerShell on Windows, Terminal on macOS/Linux). Typing python or python3 followed by --version confirms the install worked and tells you exactly which version you're running — worth checking, since Python 2 and Python 3 are different enough that code written for one often won't run on the other.
Download the installer
Go to python.org/downloads and grab the installer for your operating system — it detects your OS automatically and offers the latest stable release.
Run it, and watch for one checkbox
On Windows specifically, the installer shows a checkbox for "Add python.exe to PATH" — tick it. Skipping this is the single most common reason typing python in a terminal later does nothing.
Verify the install
Open a terminal and type python --version (or python3 --version on macOS/Linux). Seeing a version number back confirms everything worked.
Pick an editor
Any text editor works, but something built for code — VS Code, PyCharm, or even a simple editor with Python syntax highlighting — makes reading indentation and errors much easier.
You're ready to run real files
With Python installed and an editor open, you can now save .py files and run them from the terminal — covered next.
python3 --versionRecommended resourcesAffiliate links · may earn us a commission
Recommended for learners
Practice what you learned
Re-implement each visualized algorithm in Python yourself — building beats watching.