Someone sends you a Python script. You type python script.py and the terminal says "command not found". Or on Windows, it opens the Microsoft Store instead. I have hit this many times, on my own machines and on clients' machines. Nearly every time the cause was the setup, not the person's skill.
This post goes from an empty computer to your first running program, using only the routes the official docs currently recommend.
Which Python is current
I checked python.org on 21 October 2026. The latest stable release is Python 3.15.0, released on 9 October 2026. Versions 3.14, 3.13, 3.12 and 3.11 are still supported. Python 3.10 reached its end of support at the start of October 2026, so if your machine still has 3.10 or older, it is time to move.
You do not have to chase the newest version in week one. A library you want might not have caught up yet. If that happens, 3.14 or 3.13 is a safe fallback. For a beginner, the newest release is usually fine, and the uv tool below makes switching versions easy.
Installing Python
On Windows, the Python 3.15 docs recommend a tool called the Python install manager, available from python.org/downloads or the Microsoft Store. After installing, the python, py and pymanager commands work in a terminal. The old-style .exe installer has been deprecated since 3.14 and will not be produced for 3.16 or later.
On macOS, download the .pkg file from python.org/downloads/macos and click through. When it finishes, open /Applications/Python 3.15/ and double-click the file Install Certificates.command. People skip this step, and skipping it leads to SSL certificate errors later (more on that below). On a Mac the command is python3, not python.
On Linux, most distributions already ship python3. Type python3 --version to see.
You should see a line like Python 3.15.0. One tip: do not delete or modify the Python that comes with macOS (/usr/bin/python3). The system and other software rely on it.
One private room per project
This is where many beginners trip. You install a library (ready-made code written by someone else, such as one for reading Excel files). A few months later another project needs an older version of the same library. The two projects step on each other.
The fix is to give each project its own environment (technically a virtual environment): a folder holding exactly the Python and exactly the libraries that project needs, touching nothing else. Think of a separate room per project with its own set of tools.

On Ubuntu I ran into a very visible version of this. Running pip3 install requests against the system Python returns error: externally-managed-environment. The system refuses to let you install into the operating system's own Python, and that is deliberate.
Use uv for all of it
There are several ways to make a private environment. I use uv, a tool from Astral, because one tool downloads the right Python, creates the environment and installs libraries. I installed and ran everything here with uv 0.13.4.
Install uv (from docs.astral.sh/uv):
# macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
After installing, close the terminal and open a new one so the uv command is found. To update later, run uv self update.
Run your first program, step by step

Step 1, create a project folder and initialise it:
mkdir practice && cd practice
uv init --bare --python 3.15
This creates a pyproject.toml, a declaration of which Python and which libraries the project needs. If the machine does not have Python 3.15 yet, uv downloads it when needed. On my test machine it fetched 3.15 in a couple of seconds.
Step 2, add a library (for example requests, which fetches web pages):
uv add requests
This installs the library into the project's own environment (the .venv folder) and records the exact versions in uv.lock. On my run it installed requests 2.34.2 in about a second.
Step 3, create a file hello.py in any editor:
import sys
import requests
name = sys.argv[1] if len(sys.argv) > 1 else "friend"
r = requests.get("https://httpbin.org/get", timeout=10)
print(f"Hello {name}! Python {sys.version.split()[0]}, requests {requests.__version__}")
print("The site answered with status", r.status_code)
Step 4, run it:
uv run hello.py Lan
What I got on the test machine:
Hello Lan! Python 3.15.0, requests 2.34.2
The site answered with status 200
You never have to "activate" anything. uv run uses the project's environment on its own. If you still prefer to activate by hand: source .venv/bin/activate on Mac and Linux, .venv\Scripts\activate on Windows.
When you hand the project to someone else, send pyproject.toml and uv.lock along with your code. They run uv sync and get an identical environment.
Common problems on Windows and macOS

Typing python on Windows opens the Microsoft Store. Windows ships a placeholder shortcut for python. The Python docs give the fix: open Start, search "Manage app execution aliases", check that the "Python (default)" entries are on, and if they already are, switch them off and on again. Also make sure PATH contains %UserProfile%\AppData\Local\Microsoft\WindowsApps.
py says "can't open file". Usually an older py launcher from a past install is taking priority. Uninstall "Python launcher" from Installed apps and try again.
You installed uv but uv is still not found. Almost always the terminal you have open does not know the new path yet. Close it fully and open a new one.
macOS says command not found: python. On a Mac use python3. Or let uv run pick the right Python for you.
macOS shows CERTIFICATE_VERIFY_FAILED when calling a website. This follows from skipping the file Install Certificates.command after installing Python from python.org. Open /Applications/Python 3.15/ and run it. A Python downloaded by uv usually avoids this, but I did not test on a Mac, so that part comes from the documentation.
Linux says externally-managed-environment. Do not force it with an override flag. Make a private environment as above.
What to do next
Running a file that prints text is only the first step. Two directions I find useful for people with a job to do are turning Python into an assistant for daily office work, as in Automating Office Work with Python: Merge Excel Files, Build a Report and Send the Email, or building a small data gateway for an app, as in Your First API with FastAPI: Products, Input Checks and Automatic Docs.
If you need someone to set up the environment and write Python tools for your shop or office, send me a message through the contact page.



