# How to Install Python (and Which Method to Choose)


Use [uv](https://pydevtools.com/handbook/reference/uv.md) to install Python. Install uv once, and it downloads Python for you, keeps each project on the version it needs, and never touches the Python your operating system depends on. It works the same way on macOS, Windows, and Linux.

> [!TIP]
> Short on time? Install uv, then run `uv python install`. That gets you a current, project-ready Python without admin rights. The rest of this page explains the alternatives and when they make sense.

## Install Python on your machine

First install uv, then let it fetch Python. Open a terminal and run the commands for your operating system.

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
Restart your terminal so uv is on your `PATH`, then install the latest Python:
```bash
uv python install
```
```powershell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```
Open a new terminal so uv is on your `PATH`, then install the latest Python:
```powershell
uv python install
```
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
Restart your terminal so uv is on your `PATH`, then install the latest Python:
```bash
uv python install
```
uv downloads about 24 MB the first time and prints a confirmation like `Installed Python 3.14.6 in 800ms`. No `sudo` or admin shell is required, because the interpreter lands in a user-owned directory. For alternative uv installers (Homebrew, WinGet, Scoop), signature verification, and version-specific commands, see [how to install uv](https://pydevtools.com/handbook/how-to/how-to-install-uv.md) and [how to install Python with uv](https://pydevtools.com/handbook/how-to/how-to-install-python-with-uv.md).

## Confirm Python runs

Check that Python works through uv:

```console
$ uv run python --version
Python 3.14.4
```

If you see a version number, Python is installed and uv can find it.

## Why doesn't `python` work on its own?

uv installs Python for project use, so the command to run it is `uv run python`, not a bare `python`. `uv run python` always uses the version the current project pins, which is why this handbook leans on it instead of a global command.

A plain `uv python install` adds versioned commands like `python3.13` to your `PATH`, but it does not create an unversioned `python`. Typing `python` right after installing may find nothing, or silently run a different Python your system already had.

To get a global `python` command anyway, install one explicitly:

```console
$ uv python install --default
```

That adds `python` and `python3` next to the versioned executables. The `--default` flag is experimental. For the full walkthrough see [how to add Python to your system PATH with uv](https://pydevtools.com/handbook/how-to/how-to-add-python-to-your-system-path-with-uv.md), and if `python` still reports `command not found`, see [how to fix "command not found: python" on macOS](https://pydevtools.com/handbook/how-to/how-to-fix-python-command-not-found-on-mac.md).

## Start a project, not a bare interpreter

Most of the time you don't want a loose `python` command; you want a project. In an empty folder, run:

```console
$ uv init --name myproject
Initialized project `myproject`
$ uv run python -c "import sys; print(sys.version.split()[0])"
Using CPython 3.14.4
Creating virtual environment at: .venv
3.14.4
```

`uv init` writes a `pyproject.toml`, and the first `uv run` installs Python if needed, creates a `.venv` virtual environment, and runs your code inside it. The tutorial [Getting started with uv](https://pydevtools.com/handbook/tutorial/getting-started-with-uv.md) walks through this from scratch. If you only run one-off scripts and don't want a project, see [do I need a project to use uv?](https://pydevtools.com/handbook/explanation/do-i-need-a-project-to-use-uv.md).

## What does "installing Python" actually involve?

Putting an interpreter on disk is only the first of three separate jobs:

- **Install the interpreter.** Get a Python runtime onto your machine (this page).
- **Create a virtual environment.** Give each project its own isolated space so packages never collide.
- **Manage dependencies.** Declare the libraries a project needs and record exact versions for reproducibility.

Older setups stitch these together from separate tools: python.org or pyenv for the interpreter, `venv` for the environment, pip for dependencies. uv does all three. `uv python install` handles the interpreter, and `uv init` plus `uv run` create the environment and install dependencies for you. That single tool is why the handbook recommends starting with uv.

## Pick a different installer only if you have a reason

You'll run into other ways to get Python. Each has a narrow case where it fits.

- **python.org installer.** The reference CPython build, downloaded from [python.org](https://www.python.org/downloads/). Reasonable if you want one Python and will manage environments and dependencies yourself. It won't switch versions per project.
- **Python Install Manager / Microsoft Store (Windows).** python.org's Python Install Manager (the `py` command) installs and switches Windows versions, and the Microsoft Store package is a one-click alternative. Fine for a first Python on Windows, but neither manages your project's dependencies.
- **Homebrew (macOS/Linux).** `brew install python` exists to satisfy other [Homebrew](https://pydevtools.com/handbook/reference/homebrew.md) formulae, and `brew upgrade` can bump the version out from under you. Use it for a throwaway `python3`, not project work; see [should I use Homebrew to install Python?](https://pydevtools.com/handbook/explanation/should-i-use-homebrew-to-install-python.md).
- **pyenv.** [pyenv](https://pydevtools.com/handbook/reference/pyenv.md) builds versions from source for side-by-side use. A solid pre-uv choice, but uv does the same job without a compiler toolchain; see [how pyenv and uv compare](https://pydevtools.com/handbook/explanation/how-do-pyenv-and-uv-compare-for-python-interpreter-management.md).
- **Anaconda / conda.** Choose it when you need conda-only packages such as CUDA, GDAL, or HDF5, or a batteries-included data-science stack. Otherwise it is heavier than the job needs; see [which package manager should I use?](https://pydevtools.com/handbook/explanation/which-python-package-manager-should-i-use.md).

Whichever you pick, avoid building projects on the [system Python](https://pydevtools.com/handbook/explanation/why-should-i-avoid-system-python.md) that ships with macOS and Linux. It exists for the operating system, ships one aging version, and breaks OS tools when you install packages into it.

## Frequently asked questions

### How do I install Python?

Install uv, then run `uv python install`. uv downloads a prebuilt CPython without admin rights and works the same way on macOS, Windows, and Linux. You can skip the explicit step too: uv downloads Python the first time you run a project.

### Which Python should I use?

Use the latest stable CPython, installed and managed by uv rather than the Python your operating system ships. A uv-managed [interpreter](https://pydevtools.com/handbook/explanation/what-is-a-python-interpreter.md) stays separate from the system one, so upgrades never break OS tools and each project can pin its own version.

### Do I need to install Python separately before using uv?

No. uv downloads and manages Python for you, so installing uv is enough to get started. Running `uv init` then `uv run` in a new folder installs a version, creates a virtual environment, and runs your code in one step.

## Learn More

- [How to Install Python on macOS](https://pydevtools.com/handbook/how-to/how-to-install-python-on-macos.md)
- [How to Install Python on Windows](https://pydevtools.com/handbook/how-to/how-to-install-python-on-windows.md)
- [How to Migrate from conda to uv](https://pydevtools.com/handbook/how-to/how-to-migrate-from-conda-to-uv.md)
- [How do uv and conda compare?](https://pydevtools.com/handbook/explanation/how-do-uv-and-conda-compare.md)
- [mise: Polyglot Runtime and Tool Version Manager](https://pydevtools.com/handbook/reference/mise.md)
- [How to install uv](https://pydevtools.com/handbook/how-to/how-to-install-uv.md)
- [How to install Python with uv](https://pydevtools.com/handbook/how-to/how-to-install-python-with-uv.md)
- [Getting started with uv](https://pydevtools.com/handbook/tutorial/getting-started-with-uv.md)
- [Why should I avoid the system Python?](https://pydevtools.com/handbook/explanation/why-should-i-avoid-system-python.md)
- [Which Python package manager should I use?](https://pydevtools.com/handbook/explanation/which-python-package-manager-should-i-use.md)
- [uv reference page](https://pydevtools.com/handbook/reference/uv.md)
