UV

An extremely fast Python package and project manager, written in Rust.

Official Doc: https://docs.astral.sh/uvarrow-up-right

Installation: https://docs.astral.sh/uv/getting-started/installation/arrow-up-right

Creating and using venv

https://docs.astral.sh/uv/reference/cli/#uv-venvarrow-up-right

circle-info

-p 3.X in any command to specify a python version to use

circle-info

Replace all pip ... commands by uv pip ... to use uv

create a .venv in current dir, no need to activate venv with uv

uv venv

To have pip installed in venv, can be useful for vscode extensions that arent compatible with uv

uv venv --seed

Project's environment (installs project in editable mode)

If you have pyproject.toml in your project, this command will create/update .venv for the project

uv sync

you could also directly run your package's entrypoint(s), uv will installs package in editable mode automatically, e.g:

uv run fitspy

Working with uvx

uvx is short for uv tool run It can run python modules without installing, e.g:

uvx can also be really useful to test an app you're developping on different python version without having to create multiple venv, for example, when I'm developping:

or if you dont have a entrypoint script for your package you could juste use uv run, but note that each time you test another python version, it will delete and recreate .venv

UV Cache Clean

Use this command to clean UV's cache:

Last updated