On Windows, open PowerShell and check py --version or python --version. In a Linux terminal, start with python3 --version. Use the command that reports the interpreter you intend to use and keep your project in a folder you can write to. If you use Windows Subsystem for Linux (WSL), decide whether the project runs in Windows or in Linux before creating an environment.
Check what is already installed
Open a terminal and run the version command for the interpreter you intend to use. Windows installations may provide python or py; Linux commonly provides python3. The command name alone does not prove which installation an editor or scheduled task will use.
Record the full interpreter path when possible. In Python, sys.executable identifies the interpreter executing the program. If the version command fails, use the official installation documentation or ask the administrator of a managed computer. Avoid collecting unrelated installers from search results until you understand what is missing.
Work in a folder you own
Create a project directory inside a location where your account can read and write. Extract the complete ZIP before running files. A ZIP viewer is not a normal working folder, and relative paths can behave differently from what you expect.
Your source belongs outside the virtual environment. A simple arrangement is a project folder containing a README, source files, tests, a disposable .venv directory, and a separate output folder. Keep working databases out of live file synchronization when concurrent synchronization could interfere with their sidecar files.
Separate installation permissions from exercise permissions
Installing Python or a distribution package may require administrator privileges or IT approval. That does not mean the lesson itself should run as administrator. The completed local exercises on this site state their normal-user requirements explicitly.
On some Linux distributions, virtual-environment support is packaged separately. Follow that distribution's instructions if venv reports that a component is missing. Create and run the project environment with your normal user afterward. Do not use elevated privileges as a general fix for a badly chosen project folder.
Prefer explicit commands while learning
After creating an environment with python -m venv .venv, Windows users can run .\.venv\Scripts\python.exe. Linux users can run ./.venv/bin/python. These explicit paths avoid ambiguity and do not require shell activation.
The exact creation command depends on the Python command available on your machine. The principle is consistent: use the same interpreter family to create the environment, install any dependencies, and run the source and tests.
Verify the version, interpreter path, and working folder
You should know the operating system, Python version, interpreter path, working folder, and where outputs will be written. Read the course's requirements before downloading extra tools. A browser and a plain-text editor are sufficient companions for many standard-library projects.
Diagnose the first run in this order
If typing a Python command opens an app store or returns a command-not-found message, identify the command your installation provides before changing any code. Windows systems may have the py launcher, a python command, or both. Linux systems often provide python3. Check the version printed by the command you intend to use.
Once Python starts, check its executable path. This is a better diagnostic than guessing from a prompt or a folder name.
import sys
print(sys.version)
print(sys.executable)
Use that same interpreter to create the project's virtual environment. Then check the path again using the environment's interpreter. If the paths are identical before and after, you may still be running the base interpreter. Your project keeps working if you invoke the environment's Python directly, even when shell activation is unavailable.
Know what you can install and where you can write
On a managed computer, operating system packages and software updates may require an administrator. A local project folder and a virtual environment often work with ordinary user access once a suitable interpreter is installed. Ask whoever manages the machine about its approved Python distribution if you cannot install one yourself.
Test the folder with a disposable file. Save it from your editor, run it from the intended terminal, and check that you can write a second file next to it. A synced folder or network drive can behave differently from a local workspace, especially when files are opened by other software. Choose the most predictable location available for your first exercise.
If you have an editor running in WSL or a remote environment, verify which filesystem your project lives on and where Python is running. A Linux interpreter needs a Linux environment. Pointing it at a Windows virtual environment will not convert the installed packages or launchers.
Write down the working setup
Record the terminal, interpreter command, Python version, project working directory, and one verification command. Give a colleague the notes and ask what they would run first. If they have to infer which executable to use, name the exact command that worked.
To check a fresh setup, start a new terminal in the project directory and run the example again. Changing terminals removes incidental activation or a previous working directory. A stable setup still produces the expected result when you repeat the documented steps.
Once the interpreter and folder are working, set up a virtual environment for the project to keep its dependencies separate.