Getting Python running is simple — no separate development server is needed, since Python isn't inherently a web technology. You just install it and run files directly.
Download Python from python.org/downloads (Windows/macOS), or install it through your system's package manager on Linux (apt install python3 on most distributions). Once installed, confirm it from a terminal:
python3 --versionpython vs. python3
On Windows, the command is often just python rather than python3. Either way, confirm you're running Python 3 — Python 2 reached end of life in 2020 and none of this section applies to it.
Typing python3 alone (no filename) opens an interactive prompt where you can try code one line at a time and see the result immediately — extremely useful for quickly testing an idea:
$ python3
>>> 2 + 2
4
>>> print("Hello!")
Hello!
>>> exit()Create a file named hello.py:
print("Hello, world!")Then run it from a terminal in the same folder:
python3 hello.pyThere's no special opening tag needed — a .py file is Python from the very first line.
pip — Python's package installer, covered properly in the Modules and Imports lesson — ships with Python 3.4 and later, so it's almost always already there. Confirm it the same way:
pip3 --versionIf that command isn't found, reinstalling Python from python.org (making sure the "Add to PATH" / "install pip" option is checked during setup) fixes it on nearly every system.
A proper editor helps early
Most real Python development happens in a code editor with Python support (VS Code's Python extension is the most common choice) rather than a plain text editor — it catches obvious mistakes as you type instead of only when you run the file.