Uv - review - 2026

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2026
Перейти к:навигация, поиск

uv is a high-performance package, virtual environment, and Python version manager developed by Astral Software and written in Rust. As of 2026, it has become one of the fastest-growing tools in the Python ecosystem, combining the functionality of pip, pipx, virtualenv, Poetry, and pyenv into a single binary.

History

The first public release of uv was in February 2024. By 2026, the tool has gone through several major releases, reaching production-grade stability. It was motivated by the desire to replace traditional Python tooling, which suffers from poor performance due to pure-Python implementation and ecosystem fragmentation.

Key Features

Python Version Management

uv can install and switch between Python versions (including CPython and PyPy):

uv python install 3.12
uv python install pypy@3.10
uv python pin 3.12

It automatically downloads and builds Python distributions, removing the need for pyenv.

Projects & Dependencies

uv supports the PEP 621 standard with pyproject.toml configuration:

uv init my-project
uv add requests
uv sync
uv lock
uv run main.py

The uv.lock file ensures reproducible environments, similar to Poetry or npm lock files.

Tool Management

A pipx replacement for running CLI applications in isolation:

uv tool install ruff
uvx aider-chat
uv tool list
uv tool upgrade --all

Pip-Compatible Interface

For migration from pip, uv offers full compatibility mode:

uv pip install -r requirements.txt
uv pip list --outdated
uv pip compile pyproject.toml -o requirements.txt

Script Management

uv supports running Python scripts with inline dependencies (PEP 723):

# /// script
# dependencies = ["requests"]
# ///
import requests
print(requests.get('https://example.org'))
uv run script.py

Performance

Thanks to Rust implementation and efficient caching, uv is 10–100x faster than pip for package installation. Dependency resolution is an order of magnitude faster than Poetry. The cache is centralized and shared across projects, Python versions, and platforms.

Integrations

  • Docker: official image at ghcr.io/astral-sh/uv with caching optimizations and multi-stage builds
  • GitHub Actions: official astral-sh/setup-uv action
  • GitLab CI/CD, Pre-commit, Renovate, Dependabot — native support
  • Registries: PyPI, Azure Artifacts, Google Artifact Registry, AWS CodeArtifact, JFrog Artifactory
  • Frameworks: FastAPI, PyTorch, Jupyter, marimo, Bazel, AWS Lambda, Coiled

Comparison

Feature uv pip pipx virtualenv Poetry conda
Package installation
Virtual environments
Python version management
Lock file
Run CLI without install
Inline script dependencies
Cross-platform
Performance 10–100× faster than pip ~10× slower than uv

Installation

macOS (Homebrew)

brew install uv

Linux / macOS (standalone)

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

Windows

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

Docker

FROM ghcr.io/astral-sh/uv:latest

Other methods

PyPI, pipx, Cargo (cargo install uv), WinGet, Scoop, MacPorts.

Ecosystem

uv is part of the Astral tool ecosystem, which also includes Ruff (Python linter and formatter). Both are commonly used together: Ruff for code quality, uv for dependency and environment management.

Summary

uv is a modern, extremely fast, and feature-rich Python environment management tool that, by 2026, has become the de facto standard for new projects. It replaces pip, pipx, virtualenv, pyenv, and partially Poetry with a unified interface and performance orders of magnitude ahead of traditional alternatives. Support for PEP 723 (inline script dependencies) and deep integration with major CI/CD systems and cloud registries make uv a universal solution for both local development and production environments.

Links

×
Реклама
ИКС