Skip to content

Getting started

Get a working Python and an editor that helps you. Half the questions in the help channels are environment problems wearing a costume.

Install Python

Get 3.12 or newer. I'd avoid any version of python that isn't in the latest stable release.

Install from python.org. Tick Add python.exe to PATH in the installer — it's off by default and it's the single most common cause of "python is not recognized".

Verify it, using the py launcher that ships with the Windows installer:

> py --version
Python 3.12.7

Skip the Microsoft Store version

It works, mostly, until it doesn't. Its sandboxing breaks tools that expect to write next to the interpreter.

The system Python is there for macOS, not for you. Install your own with Homebrew:

$ brew install python@3.13
$ python3 --version
Python 3.13.14

Or download the installer from python.org if you'd rather not add a package manager.

Your distribution has a Python, and it's probably fine for scripts. For anything you plan to keep, install a version you control:

$ sudo apt install python3.13 python3.13-venv   # Debian, Ubuntu
$ sudo dnf install python3.13                   # Fedora

The -venv package is separate on Debian and Ubuntu, and leaving it out breaks virtual environments with a genuinely baffling error.

Pick an editor

No editor here is better than the others — more features is not the same as more suitable. Pick one that fits what you're doing now and change later if it starts getting in the way.

Opens, runs your file, gets out of the way.

Editor Notes
IDLE Ships with Python, so it's already installed. Fine for a first week
Thonny Built for learners. Its variable and step debugger is the best reason to use it
Zed Fast, modern, very little to configure
Notepad++ Windows only. A text editor with syntax highlighting, not an IDE
PyScripter Windows only. Lightweight, Python-specific

A real editor you'll grow into, without a full IDE's weight.

Editor Notes
VS Code What most people here use. Install the Python extension first
VSCodium VS Code without Microsoft's branding and telemetry
Sublime Text Very fast. Free to evaluate indefinitely, licence requested
Pulsar Community continuation of Atom
Neovim People who already use Neovim

Refactoring, debugging and project tooling built in. Heavier to start, worth it on anything large.

Editor Notes
PyCharm The most capable Python IDE. Free community edition
Wing Python-only IDE with a strong debugger. Free personal edition
Spyder Aimed at data and scientific work, MATLAB-ish layout

Don't shop for long

An hour comparing editors is an hour not spent writing Python. Take VS Code if you have no opinion yet.

Virtual environments

A virtual environment is a per-project copy of Python's package directory. Without one, every project shares one set of packages, and two projects that need different versions of the same library can't both work.

$ python3 -m venv .venv
$ source .venv/bin/activate      # macOS, Linux
$ .venv\Scripts\activate         # Windows
(.venv) $ pip install requests

The (.venv) prefix means it's active. If it isn't there, pip install is installing somewhere you didn't intend.

uv replaces pip and venv with one much faster tool, and it manages Python versions too:

$ uv init myproject
$ cd myproject
$ uv add requests
$ uv run main.py

uv run activates the environment for you, so there's nothing to forget. Our own projects use it — see Eos.

Add .venv to .gitignore

A virtual environment is build output. It's large, it's platform-specific, and committing it will earn you comments on your first pull request.

Where to go next

The learning path has material sorted by level, and the cheat sheets and tools page has the things worth keeping in a browser tab. If you're already stuck on something, ask well and you'll get an answer.