TutorialsPythonInstall and Run Python
Getting Started · Chapter 2

Install and Run Python

Learn the basic tools you need to run Python locally.

Why this matters

Before learning syntax, you need a repeatable way to execute code and see the result.

Start with the idea

The simplest workflow is: install a current Python 3 release, open a terminal, verify the installation, create a .py file, and run it with the Python command available on your system.

IdeaUnderstand the purpose
CodeRun the smallest example
PracticeChange it yourself
SubjectVision learning pattern: understand the idea before memorizing syntax.

Small working example

Run this example first. Do not change several things at once; confirm the basic behavior, then experiment.

Python
python --version
python hello.py
Expected output
Python 3.x.x
Hello, Python!
What to notice

The example is intentionally small. Focus on the chapter’s main idea before adding extra syntax or framework code.

Common beginner mistake

Mistake

Editing code without checking which Python installation your terminal is using.

Better approach

Verify the version first. If your system uses python3 instead of python, use that consistently in examples.

Quick recap

  • Use Python 3.
  • Verify the interpreter version.
  • Run files from the terminal to build confidence with the basic workflow.

Try it yourself

These are deliberately small. If you can complete them without copying the example, you are ready to continue.

  1. Create hello.py and run it.
  2. Intentionally misspell the filename and read the error message.