Extremely fast Python package and project manager written in Rust, replacing pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and more with 10-100x faster performance. Use when managing Python projects, installing packages, running scripts with dependencies, managing Python versions, or needing high-performance dependency resolution.
Instrucciones de origen · Vista previa de solo lectura
name
uv-0-11-6
description
Extremely fast Python package and project manager written in Rust, replacing pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and more with 10-100x faster performance. Use when managing Python projects, installing packages, running scripts with dependencies, managing Python versions, or needing high-performance dependency resolution.
uv is an extremely fast Python package and project manager, written in Rust. It replaces pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and more — with 10-100x faster performance across all operations.
uv provides three primary interfaces:
Projects — Full project management with lockfiles, dependency resolution, and automatic environment management (uv init, uv add, uv sync, uv run, uv lock)
Tools — Install and run Python CLI tools without polluting your system (uv tool install, uvx)
Building and publishing Python packages (uv build, uv publish)
Working with monorepos via workspaces
Setting up CI/CD with reproducible lockfiles
Core Concepts
Three Interfaces
uv organizes its functionality into three interfaces:
Project interface — The primary, high-level workflow for managing Python projects with automatic environment and lockfile management
Tool interface — For installing and running standalone Python CLI tools
pip interface — A drop-in replacement for pip, pip-tools, and virtualenv commands
Universal Lockfiles
uv generates a uv.lock file that is universal (cross-platform). It captures the packages that would be installed across all possible Python markers — operating system, architecture, and Python version. Unlike requirements.txt, this lockfile is checked into version control for reproducible installations.
Automatic Lock and Sync
Locking and syncing are automatic in uv. When you run uv run, the project is locked and synced before invoking the command. This ensures the environment is always up-to-date without manual steps.
Managed Python Versions
uv can install Python versions itself (managed Python) or discover existing system installations. By default, it automatically downloads Python versions as needed. Use uv python install to explicitly install versions, and .python-version files to pin versions per-project.
# Create a new project
uv init my-app
cd my-app
# Add a dependency
uv add httpx
# Run the project
uv run python main.py
# Or run a specific command with extra dependencies
uv run --with ruff ruff check .
One-Off Tool Execution
# Run ruff without installing it (uvx is an alias for uv tool run)
uvx ruff check .
# Run a specific version
uvx ruff@0.6.0 check .
# Run with additional dependencies
uvx --with httpx==0.27.0 mytool
Managing Python Versions
# Install a specific Python version
uv python install 3.12
# Pin a version for the current project
uv python pin 3.12
# List installed versions
uv python list
Creating a Virtual Environment
uv venv --python 3.12
source .venv/bin/activate
Advanced Topics
Project Structure and Files: pyproject.toml, lockfiles, virtual environments → Projects