uv

uv is a Rust-based package and project manager for Python that combines a pip-compatible installer, virtual environment management, a tool runner, and Python version management in one command-line interface (CLI).

Installation and Setup

Install the standalone binary:

Windows PowerShell
PS> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Shell
$ curl -LsSf https://astral.sh/uv/install.sh | sh

If you don’t have curl installed on your system, then you can use wget as shown below:

Shell
$ wget -qO- https://astral.sh/uv/install.sh | sh

You can also install uv with pip, Homebrew, and other tools.

Key Features

  • Drop-in interface for common pip, pip-tools, and virtualenv workflows, with documented differences where behavior diverges.
  • Project management with a lockfile for reproducible installs, workspace support, and commands like uv add, uv lock, and uv sync.
  • Tool runner and installer for Python CLI apps via uvx and uv tool, which create isolated environments for commands.
  • Python version management, including installing, pinning, and selecting interpreter on demand.
  • Disk-efficient caching with a global cache and CI-friendly pruning.

Usage

Install a Python version on demand and create a virtual environment:

Shell
$ uv python install 3.14
$ uv venv --python 3.14

Initialize a project and install dependencies:

Shell
$ uv init project_name
$ cd project_name
$ uv add requests

Reproduce the working environment in a uv-managed project:

Shell
$ uv sync

Run or install command-line tools published as packages:

Shell
$ uvx black --version
$ uv tool install ruff

Tutorial

Managing Python Projects With uv: An All-in-One Solution

Learn how to create and manage your Python projects using uv, an extremely fast Python package and project manager written in Rust.

intermediate tools

For additional information on related topics, take a look at the following resources:


By Leodanis Pozo Ramos • Updated Nov. 25, 2025