Reading preferences
Concept

Setting Up Python

Find Python, check its version, run a file, and understand isolated environments.

python, installation, interpreter, virtual environment

Prepare a workspace

Think of the interpreter as the person reading a recipe and a .py file as the recipe page. Before running a program on your own computer, you need an installed Python interpreter and a place to save your code. Intuvo shows prepared examples; it does not run code in the browser.

Visit the official Python downloads and follow the installation instructions for your operating system. On a shared or managed computer, follow its administrator's rules.

Check and run

In a terminal, python3 --version commonly works on macOS and Linux; Windows often uses py --version. The command name depends on your installation. If it is not found, consult the official platform guide rather than copying an unknown installation command.

Save print("Hello!") as hello.py, open a terminal in that folder, then run python3 hello.py on systems where python3 is available, or py hello.py with the Windows launcher. The prepared output is Hello!. If the file cannot be found, check the terminal's current folder and the filename.

Python illustration

print("Hello!")

Prepared output — not live execution:

Hello!

Keep projects separate

A virtual environment is a project-specific place for Python packages. For example, python3 -m venv .venv creates one using that interpreter; the Windows launcher can use py -m venv .venv. Activation commands differ by shell and operating system; see the linked official guide. Activating an environment changes which interpreter and packages commands find in that terminal. It is not a security sandbox, and it does not install every package.

The examples so far need only Python's standard installation. Always review the source of code and packages before running or installing them.

Reflect on the concept

Four fixed questions to reinforce the reasoning. Answers are not saved or scored.

1. What does a version check tell you?
2. What does python3 hello.py ask Python to do?
3. Why use a virtual environment?
4. Where should a beginner check for Python installation instructions?

References and further reading