---
title: "Getting Started with Python in 2026: Install, a Clean Setup and Your First Script"
url: https://phatdev.net/en/blog/python-start-2026
lang: en
updated: 2026-10-21
alternate:
  vi: https://phatdev.net/vi/blog/python-start-2026
markdown: https://phatdev.net/en/blog/python-start-2026.md
---

# Getting Started with Python in 2026: Install, a Clean Setup and Your First Script

> Typed python and got the Microsoft Store? How to install Python 3.15, use uv for a private environment per project, run your first script and fix common Windows and macOS problems.

Categories: Backend | Published: 2026-10-21 | Level: Beginner | 6 min read

Tags: python, uv, beginner, windows, macos, setup

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.

![Three projects, each in its own environment](https://phatdev.net/uploads/blog/python-start-2026/env-1920.webp)

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):

```bash
# macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
```

```powershell
# 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

![Four steps from an empty machine to a running program](https://phatdev.net/uploads/blog/python-start-2026/steps-1920.webp)

Step 1, create a project folder and initialise it:

```bash
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):

```bash
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:

```python
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:

```bash
uv run hello.py Lan
```

What I got on the test machine:

```text
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

![A path that forks: one branch blocked by a warning, the other through an open gate](https://phatdev.net/uploads/blog/python-start-2026/trouble-1920.webp)

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](https://phatdev.net/en/blog/python-office-automation), or building a small data gateway for an app, as in [Your First API with FastAPI: Products, Input Checks and Automatic Docs](https://phatdev.net/en/blog/python-fastapi-first-api).

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.

## References

- [Python Downloads (python.org)](https://www.python.org/downloads/)
- [Using Python on Windows (Python 3.15 docs)](https://docs.python.org/3/using/windows.html)
- [Using Python on macOS (Python 3.15 docs)](https://docs.python.org/3/using/mac.html)
- [uv installation (Astral)](https://docs.astral.sh/uv/getting-started/installation/)
- [Working on projects with uv (Astral)](https://docs.astral.sh/uv/guides/projects/)
- [Python versions in uv (Astral)](https://docs.astral.sh/uv/concepts/python-versions/)

## Related posts

- [Automating Office Work with Python: Merge Excel Files, Build a Report and Send the Email](https://phatdev.net/en/blog/python-office-automation.md)
- [Your First API with FastAPI: Products, Input Checks and Automatic Docs](https://phatdev.net/en/blog/python-fastapi-first-api.md)
- [Packing Many On/Off Switches Into One Number: Bitmasks for Permissions and IPs](https://phatdev.net/en/blog/bitwise-in-practice.md)
