Install, set up a project, manage environments, and ship — all with UV.
Built with ❤️ using Astral’s ultra-fast Python project manager.
UV is a blazing-fast Python package and project manager by Astral.
It unifies Python installation, virtual environments, dependency management, and task running — all in one sleek CLI tool.
- ⚡ Ultra-fast installs and dependency resolution
- 🧩 Manages Python versions and environments together
- 🔧 Drop-in commands for everyday workflows
- 🧰 Cross-platform (macOS, Linux, Windows)
curl -LsSf https://astral.sh/uv/install.sh | shiwr https://astral.sh/uv/install.ps1 -UseBasicParsing | iexuv --version💡 If uv isn’t found, open a new terminal or add UV’s bin path to your PATH.
uv python list
uv python install 3.12
uv python run -p 3.12 UV manages Python itself, so no need for pyenv or conda!
mkdir hello-uv && cd hello-uv
uv initThis creates a pyproject.toml and initializes your workspace.
uv venv # create .venv
uv sync # lock and install dependencies
uv add requests
uv add fastapi uvicornView dependency tree:
uv tree
UV runs commands in the correct virtual environment automatically.
uv run python main.py[project.scripts] start = "main:main"
uv pip install -e .Then run:
uv run startuv lock
uv syncExport requirements for non-UV tools:
uv export -o requirements.txtuv venv
uv venv --python 3.11| 🧩 Category | 🔧 Command | 📝 Description |
|---|---|---|
| Project | uv init |
Initialize project |
uv add <pkg> |
Add dependency | |
uv sync [--frozen] |
Sync dependencies | |
| Python | uv python list |
List interpreters |
uv python install <ver> |
Install Python | |
| Env | uv venv |
Create virtualenv |
uv run <cmd> |
Run command in env | |
| Inspect | uv tree |
Show dependency tree |
uv cache clean |
Clear cache | |
| Export | uv export -o requirements.txt |
Export requirements |
| 💡 Solution | |
|---|---|
uv: command not found |
Open new shell or add to PATH |
| SSL / network errors | Retry with stable connection or proxy config |
| Build failures | Install compiler tools and Python headers |