# uv An extremely fast Python package and project manager, written in Rust.
Installing Trio's dependencies with a warm cache.
## Highlights - 🚀 A single tool to replace `pip`, `pip-tools`, `pipx`, `poetry`, `pyenv`, `twine`, `virtualenv`, and more. - ⚡️ [10-100x faster](https://github.com/astral-sh/uv/blob/main/BENCHMARKS.md) than `pip`. - 🗂️ Provides [comprehensive project management](#projects), with a [universal lockfile](./concepts/projects/layout.md#the-lockfile). - ❇️ [Runs scripts](#scripts), with support for [inline dependency metadata](./guides/scripts.md#declaring-script-dependencies). - 🐍 [Installs and manages](#python-versions) Python versions. - 🛠️ [Runs and installs](#tools) tools published as Python packages. - 🔩 Includes a [pip-compatible interface](#the-pip-interface) for a performance boost with a familiar CLI. - 🏢 Supports Cargo-style [workspaces](./concepts/projects/workspaces.md) for scalable projects. - 💾 Disk-space efficient, with a [global cache](./concepts/cache.md) for dependency deduplication. - ⏬ Installable without Rust or Python via `curl` or `pip`. - 🖥️ Supports macOS, Linux, and Windows. uv is backed by [Astral](https://astral.sh), the creators of [Ruff](https://github.com/astral-sh/ruff). ## Installation Install uv with our official standalone installer: === "macOS and Linux" ```console $ curl -LsSf https://astral.sh/uv/install.sh | sh ``` === "Windows" ```pwsh-session PS> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" ``` Then, check out the [first steps](./getting-started/first-steps.md) or read on for a brief overview. !!! tip uv may also be installed with pip, Homebrew, and more. See all of the methods on the [installation page](./getting-started/installation.md). ## Projects uv manages project dependencies and environments, with support for lockfiles, workspaces, and more, similar to `rye` or `poetry`: ```console $ 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.4 $ uv run ruff check All checks passed! $ uv lock Resolved 2 packages in 0.33ms $ uv sync Resolved 2 packages in 0.70ms Audited 1 package in 0.02ms ``` See the [project guide](./guides/projects.md) to get started. uv also supports building and publishing projects, even if they're not managed with uv. See the [packaging guide](./guides/package.md) to learn more. ## Scripts uv manages dependencies and environments for single-file scripts. Create a new script and add inline metadata declaring its dependencies: ```console $ echo 'import requests; print(requests.get("https://astral.sh"))' > example.py $ uv add --script example.py requests Updated `example.py` ``` Then, run the script in an isolated virtual environment: ```console $ uv run example.py Reading inline script metadata from: example.py Installed 5 packages in 12ms