> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/astral-sh/uv/llms.txt
> Use this file to discover all available pages before exploring further.

# uv - An extremely fast Python package and project manager

> uv is a single tool that replaces pip, pip-tools, pipx, poetry, pyenv, and virtualenv with 10-100x faster performance, written in Rust.

# An extremely fast Python package and project manager

Built in Rust, uv delivers 10-100x faster performance than traditional Python package managers while providing comprehensive project management, dependency resolution, and Python version control in a single tool.

<img src="https://github.com/astral-sh/uv/assets/1309177/629e59c0-9c6e-4013-9ad4-adb2bcf5080d" alt="Benchmark showing uv installing Trio's dependencies with a warm cache" />

<p className="text-center text-sm text-gray-600 mt-2">
  Installing <a href="https://trio.readthedocs.io/">Trio</a>'s dependencies with a warm cache
</p>

## Why choose uv?

<CardGroup cols={2}>
  <Card title="Blazing fast" icon="bolt">
    Experience 10-100x faster package installation and dependency resolution compared to pip. Built in Rust for maximum performance.
  </Card>

  <Card title="All-in-one tool" icon="toolbox">
    Replace pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and more with a single unified tool.
  </Card>

  <Card title="Universal lockfiles" icon="lock">
    Maintain reproducible environments across platforms with comprehensive project management and lockfile support.
  </Card>

  <Card title="Built-in Python management" icon="code">
    Install and switch between Python versions effortlessly without external version managers.
  </Card>
</CardGroup>

## Core capabilities

### Project management

Manage project dependencies and environments with support for lockfiles, workspaces, and more:

```console theme={null}
$ uv init example
Initialized project `example` at `/home/user/example`

$ cd example

$ uv add ruff
Creating virtual environment at: .venv
Resolved 2 packages in 170ms
   Built example @ file:///home/user/example
Prepared 2 packages in 627ms
Installed 2 packages in 1ms
 + example==0.1.0 (from file:///home/user/example)
 + ruff==0.5.0

$ uv run ruff check
All checks passed!
```

<Tip>
  uv creates isolated virtual environments automatically and manages all dependencies through a universal lockfile, ensuring consistency across your team.
</Tip>

### Script execution

Run single-file Python scripts with automatic dependency management:

```console theme={null}
$ echo 'import requests; print(requests.get("https://astral.sh"))' > example.py

$ uv add --script example.py requests
Updated `example.py`

$ uv run example.py
Reading inline script metadata from: example.py
Installed 5 packages in 12ms
<Response [200]>
```

### Tool installation

Install and run Python tools in isolated environments:

```console theme={null}
$ uvx pycowsay 'hello world!'
Resolved 1 package in 167ms
Installed 1 package in 9ms
 + pycowsay==0.0.0.2
  """

  ------------
< hello world! >
  ------------
   \   ^__^
    \  (oo)\_______
       (__)\       )\/\
           ||----w |
           ||     ||
```

### Python version management

Install and manage multiple Python versions:

```console theme={null}
$ uv python install 3.12 3.13 3.14
Installed 3 versions in 972ms
 + cpython-3.12.12-macos-aarch64-none (python3.12)
 + cpython-3.13.9-macos-aarch64-none (python3.13)
 + cpython-3.14.0-macos-aarch64-none (python3.14)

$ uv python pin 3.11
Pinned `.python-version` to `3.11`
```

### pip-compatible interface

Migrate from pip without changing your workflow:

```console theme={null}
$ uv pip compile docs/requirements.in \
   --universal \
   --output-file docs/requirements.txt
Resolved 43 packages in 12ms

$ uv venv
Using Python 3.12.3
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate

$ uv pip sync docs/requirements.txt
Resolved 43 packages in 11ms
Installed 43 packages in 208ms
 + babel==2.15.0
 + black==24.4.2
 + certifi==2024.7.4
 ...
```

## Performance benchmarks

uv delivers dramatic performance improvements across all operations:

<CardGroup cols={2}>
  <Card title="Warm installation" icon="fire">
    Installing packages with a warm cache - equivalent to recreating your virtual environment with previously downloaded dependencies.
  </Card>

  <Card title="Cold installation" icon="snowflake">
    Installing packages from scratch - typical in CI environments or on new machines.
  </Card>

  <Card title="Warm resolution" icon="diagram-project">
    Resolving dependencies with a warm cache - regenerating lockfiles from dependency specifications.
  </Card>

  <Card title="Cold resolution" icon="globe">
    Resolving dependencies from scratch - first-time dependency resolution on new machines.
  </Card>
</CardGroup>

<Note>
  Benchmark performance varies across operating systems and filesystems. uv uses reflinking on macOS and hardlinking on Linux for optimal performance. See the [benchmarks documentation](https://github.com/astral-sh/uv/blob/main/BENCHMARKS.md) for details.
</Note>

## Key features

* **10-100x faster** than pip for installation and resolution
* **Single tool** to replace pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and more
* **Comprehensive project management** with universal lockfiles
* **Script execution** with inline dependency metadata support
* **Python version management** - install and switch between versions
* **Tool execution** - run and install Python tools in isolated environments
* **pip-compatible interface** for seamless migration
* **Cargo-style workspaces** for scalable monorepo projects
* **Global cache** for disk-space efficient dependency deduplication
* **Cross-platform** - supports macOS, Linux, and Windows
* **No prerequisites** - installable via curl or pip without Rust or Python

## Get started

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/installation">
    Install uv using the standalone installer, pip, pipx, or your package manager.
  </Card>

  <Card title="Quick start" icon="rocket" href="/quickstart">
    Create your first project and learn the essential commands in minutes.
  </Card>
</CardGroup>

<Warning>
  uv is production-ready and widely used. It follows a stable versioning policy with backwards compatibility guarantees.
</Warning>

## Backed by Astral

uv is developed by [Astral](https://astral.sh), the creators of [Ruff](https://github.com/astral-sh/ruff), the extremely fast Python linter and formatter, and [ty](https://github.com/astral-sh/ty), the next-generation Python type checker.
