# How to install uv


You can install [uv](https://pydevtools.com/handbook/reference/uv.md), the fast Python package and project manager, with a standalone installer, with pip, or with package managers like Homebrew, WinGet, and Scoop. The recommended method on every platform is the official standalone installer, because it requires no existing Python interpreter, no package manager, and no other prerequisites.

You do not need Python installed first. The standalone installer downloads a self-contained uv binary, and uv can then install and manage Python interpreters for you.

## Install with the standalone installer

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

On Linux systems without `curl`, use `wget`:

```bash
wget -qO- https://astral.sh/uv/install.sh | sh
```
Open PowerShell and run:

```powershell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```
After running the installer, **open a new terminal window** so the updated `PATH` takes effect.

## Review the installer before running it

Piping a remote script directly to `sh` means you never see what it does before it runs. A malicious or compromised server could also detect the pipe and serve different content to `curl | sh` than to `curl | less` (see [this 2018 demonstration](https://news.ycombinator.com/item?id=17636032)).

If you want to read the installer before running it, download it to a file, review it, then execute it:

```bash
curl -LsSf https://astral.sh/uv/install.sh -o uv-install.sh
less uv-install.sh
sh uv-install.sh
```
```powershell
Invoke-WebRequest -Uri https://astral.sh/uv/install.ps1 -OutFile uv-install.ps1
Get-Content uv-install.ps1
powershell -ExecutionPolicy ByPass -File uv-install.ps1
```
To skip the install script entirely, use a package manager from [Alternative methods](#alternative-methods) or download a signed binary from [uv's GitHub releases](https://github.com/astral-sh/uv/releases). Each release ships per-asset `.sha256` files and a combined `sha256.sum`.

OpenAI also publishes [Sigstore/SLSA](https://slsa.dev) provenance attestations for every uv release, so you can verify a downloaded binary was built by the official uv release workflow. With the [GitHub CLI](https://cli.github.com) installed, pass the downloaded file to `gh attestation verify`:

```bash
gh attestation verify uv-aarch64-apple-darwin.tar.gz --repo astral-sh/uv
```

For broader supply-chain defense, see [How to protect against Python supply chain attacks with uv](https://pydevtools.com/handbook/how-to/how-to-protect-against-python-supply-chain-attacks-with-uv.md).

## Verify the installation

```bash
uv --version
```

If you get `command not found`, open a new terminal window. The installer modifies your shell profile, but those changes only apply to new sessions. See the platform-specific guides below for detailed troubleshooting.

## What to do after installing uv

uv handles much more than package installation. With uv on your system, you can manage Python versions, create projects with lockfiles, run scripts with inline dependencies, and format code. [The complete guide to uv](https://pydevtools.com/handbook/explanation/uv-complete-guide.md) walks through all of these workflows, or jump straight to [creating your first Python project](https://pydevtools.com/handbook/tutorial/create-your-first-python-project.md).

## Alternative methods

The standalone installer works for most setups. If you prefer a platform package manager:

| Method | Command |
|--------|---------|
| [Homebrew](https://pydevtools.com/handbook/reference/homebrew.md) (macOS/Linux) | `brew install uv` |
| WinGet (Windows) | `winget install --id=astral-sh.uv -e` |
| Scoop (Windows) | `scoop install main/uv` |
| pip | `pip install uv` |
| [pipx](https://pydevtools.com/handbook/reference/pipx.md) | `pipx install uv` |

> [!TIP]
> Installing uv via pip or pipx creates a circular dependency (you need Python to install the tool that manages Python). The standalone installer avoids this.

## Platform-specific guides

These guides cover shell completions, troubleshooting, and platform-specific details:

- [How to install uv on macOS](https://pydevtools.com/handbook/how-to/how-to-install-uv-on-macos.md)
- [How to install uv on Linux](https://pydevtools.com/handbook/how-to/how-to-install-uv-on-linux.md)
- [How to install uv on Windows](https://pydevtools.com/handbook/how-to/how-to-install-uv-on-windows.md)
- [How to use uv on Windows ARM64](https://pydevtools.com/handbook/how-to/how-to-use-uv-on-windows-arm64.md) covers the native aarch64 binary and when to use it on Snapdragon machines

## Frequently asked questions

### Do you need Python to install uv?

No. The standalone installer downloads a self-contained uv binary and requires no existing Python interpreter, no package manager, and no other prerequisites. After installing uv, you can use `uv python install` to download a managed Python interpreter, or let `uv init` install a compatible one for you automatically.

### What is uv?

uv is a fast Python package and project manager from OpenAI. It replaces pip, pip-tools, pipx, poetry, pyenv, and virtualenv with a single tool, and installs and resolves dependencies 10-100x faster than pip. See the [uv reference page](https://pydevtools.com/handbook/reference/uv.md) for full details.

### How do I install uv with pip?

Run `pip install uv`. This works but is not recommended: you need a Python interpreter to install the tool that manages Python interpreters, creating a circular dependency. Use the standalone installer instead.

### How do I update uv after installing it?

Run `uv self update`. This works regardless of how uv was originally installed. If you installed uv through Homebrew, WinGet, or another package manager, use that package manager's update command instead.

### How do I install Python with uv?

Once uv is installed, run `uv python install` to download a managed Python interpreter, or run `uv init` in a project and uv will install a compatible Python automatically. See [How to install Python with uv](https://pydevtools.com/handbook/how-to/how-to-install-python-with-uv.md) for details.

### How do I uninstall uv?

Delete the uv binary (`~/.local/bin/uv` on macOS/Linux, `%USERPROFILE%\.local\bin\uv.exe` on Windows) and remove uv's data directory with `uv cache clean`. If you installed uv with a package manager, use that package manager to uninstall it.

## Related

- [uv: A complete guide](https://pydevtools.com/handbook/explanation/uv-complete-guide.md) covers everything uv can do, from Python version management to Docker builds
- [Create your first Python project](https://pydevtools.com/handbook/tutorial/create-your-first-python-project.md) walks through using uv after installation
- [How to upgrade uv](https://pydevtools.com/handbook/how-to/how-to-upgrade-uv.md) covers updating to the latest version
- [uv reference](https://pydevtools.com/handbook/reference/uv.md) documents all uv commands
- [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) helps if Python isn't found after installing uv
- [How to protect against Python supply chain attacks with uv](https://pydevtools.com/handbook/how-to/how-to-protect-against-python-supply-chain-attacks-with-uv.md) covers PyPI-side defenses once uv is installed
