# How to install uv


Install [uv](https://pydevtools.com/handbook/reference/uv.md), the Python package and project manager, with the official standalone installer on macOS, Linux, or Windows. You don't need Python installed first or administrator access. If you already use a package manager, see [Choose the right install method](#choose-the-right-install-method).

## Install with the standalone installer

Open a terminal, then run the install command. On macOS, that's the **Terminal** app (press ⌘ Space, type `Terminal`, and press Return); on Linux, use your distribution's terminal.

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

The installer prints its progress and finishes with `everything's installed!`.
Open PowerShell and run:

```powershell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```

The installer downloads uv and reports where it installed `uv.exe`.
## Verify the installation

**Close your terminal and open it again**, then run:

```bash
uv --version
```

A successful install prints `uv` followed by its version number. If you get `command not found` or “uv is not recognized,” see [Troubleshoot a failed installation](#troubleshoot-a-failed-installation). Restarting the terminal loads the updated `PATH`, the list of places it looks for commands.

<span id="what-to-do-after-installing-uv"></span>

## Put uv to work

{{< next-steps >}}

## Choose the right install method

Use the standalone installer unless you already manage command-line tools with a package manager. Keep using that package manager to update uv, too.

| Method | Install command | When to choose it |
|--------|-----------------|-------------------|
| [Homebrew](https://pydevtools.com/handbook/reference/homebrew.md) (macOS/Linux) | `brew install uv` | You already use Homebrew. |
| WinGet (Windows) | `winget install --id=astral-sh.uv -e` | You manage Windows apps with WinGet. |
| Scoop (Windows) | `scoop install main/uv` | You already use Scoop. |
| pip | `pip install uv` | You need uv in an existing Python environment. |
| [pipx](https://pydevtools.com/handbook/reference/pipx.md) | `pipx install uv` | You already manage Python command-line tools with pipx. |

After installing, [verify that uv runs](#verify-the-installation). The pip and pipx methods require an existing Python installation; the standalone installer does not.

For **CI or containers**, use a guide for that environment: [`astral-sh/setup-uv`](https://github.com/astral-sh/setup-uv) for GitHub Actions or [How to use uv in a Dockerfile](https://pydevtools.com/handbook/how-to/how-to-use-uv-in-a-dockerfile.md) for Docker. For other scripted installations, uv's [installer options](https://docs.astral.sh/uv/reference/installer/) cover version pinning and custom installation paths.

<span id="review-the-installer-before-running-it"></span>

If you want to inspect the script first, follow uv's [installer inspection instructions](https://docs.astral.sh/uv/getting-started/installation/#standalone-installer). To install without running the script, choose a package manager from [Choose the right install method](#choose-the-right-install-method) or download a binary from [uv's GitHub releases](https://github.com/astral-sh/uv/releases).

## Troubleshoot a failed installation

- **`command not found` after installing.** The installer puts uv in `~/.local/bin` (macOS/Linux) or `%USERPROFILE%\.local\bin` (Windows) and updates your `PATH`, but that change reaches only new sessions.
    - macOS/Linux: open a new terminal, or reload the current shell with `source ~/.local/bin/env` (fish: run the activation command printed by the installer).
    - Windows: close every terminal window and open a new one. A new Windows Terminal tab can inherit the old `PATH`, so a full restart is more reliable. To unblock the session you already have open, run `$env:Path += ";$env:USERPROFILE\.local\bin"`.

    If it still fails, confirm the install directory is on your `PATH`.
- **`curl` is not installed.** If `wget` is available, run `wget -qO- https://astral.sh/uv/install.sh | sh`. It prints installation progress and a success message.
- **Neither `curl` nor `wget` is installed.** For a minimal container image, follow [How to use uv in a Dockerfile](https://pydevtools.com/handbook/how-to/how-to-use-uv-in-a-dockerfile.md). On a regular Linux system, install `curl` and CA certificates using your distribution's package manager.
- **Windows blocks the script.** The command in [Install with the standalone installer](#install-with-the-standalone-installer) passes `-ExecutionPolicy ByPass` so it runs under a restrictive policy. If you saved the script and run it as a file, pass the same flag: `powershell -ExecutionPolicy ByPass -File uv-install.ps1`.
- **You're on WSL.** Treat WSL as Linux: run the macOS / Linux command inside the WSL shell, not the Windows PowerShell installer.
- **You're behind a proxy or offline.** The installer fetches from `astral.sh` and `github.com`. Set `https_proxy` if you use one, or download a binary from [uv's GitHub releases](https://github.com/astral-sh/uv/releases) and put it on your `PATH`.
- **`uv self update` won't update.** uv self-updates only binaries installed with the standalone installer. If you installed uv with Homebrew, WinGet, Scoop, pip, or pipx, upgrade it with that tool instead.

## Find help for your platform {#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

## Uninstall uv

Follow uv's [uninstallation instructions](https://docs.astral.sh/uv/getting-started/installation/#uninstallation) to remove the binaries and optionally clear stored data. If you installed uv with a package manager, uninstall it with that manager.
