Skip to content

uv: The new virtual environment

Blog

Docs

  • Basically, it is to replace the venv.
  • It is a fast python package manager.
  • It can manage entire python projects.

Installation

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

Usage

uv init example

cd example

uv add ruff

uv run ruff check

uv lock

uv sync

Python versions

  • uv installs Python and allows quickly switching between versions.

Install multiple Python versions:

uv python install 3.10 3.11 3.12

use

uv python pin 3.10
To use 3.10 for the current directory