How to install uv
You can install uv, 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
curl -LsSf https://astral.sh/uv/install.sh | shOn Linux systems without curl, use wget:
wget -qO- https://astral.sh/uv/install.sh | shAfter 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).
If you want to read the installer before running it, download it to a file, review it, then execute it:
curl -LsSf https://astral.sh/uv/install.sh -o uv-install.sh
less uv-install.sh
sh uv-install.shTo skip the install script entirely, use a package manager from Alternative methods or download a signed binary from uv’s GitHub releases. Each release ships per-asset .sha256 files and a combined sha256.sum.
Astral also publishes Sigstore/SLSA 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 installed, pass the downloaded file to gh attestation verify:
gh attestation verify uv-aarch64-apple-darwin.tar.gz --repo astral-sh/uvFor broader supply-chain defense, see How to protect against Python supply chain attacks with uv.
Verify the installation
uv --versionIf 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 walks through all of these workflows, or jump straight to creating your first Python project.
Alternative methods
The standalone installer works for most setups. If you prefer a platform package manager:
| Method | Command |
|---|---|
| Homebrew (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 | 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:
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 Astral. 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 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 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 covers everything uv can do, from Python version management to Docker builds
- Create your first Python project walks through using uv after installation
- How to upgrade uv covers updating to the latest version
- uv reference documents all uv commands
- How to add Python to your system PATH with uv helps if Python isn’t found after installing uv
- How to protect against Python supply chain attacks with uv covers PyPI-side defenses once uv is installed
This handbook is free, independent, and ad-free. If it saved you time, consider sponsoring it on GitHub.