UV
An extremely fast Python package and project manager, written in Rust.
Official Doc
Installation
https://docs.astral.sh/uv/getting-started/installation/
Creating and using venv
https://docs.astral.sh/uv/reference/cli/#uv-venv
create a .venv in current dir, no need to activate venv with uv
To have pip installed in venv, can be useful for vscode extensions that arent compatible with uv
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
you could also directly run your package's entrypoint(s), uv will installs package in editable mode automatically, e.g:
TODO
-p 3.X to specify python version
uv pip = pip uv run is like python <script> (can be used for file or packages scripts) uv run python
uvx = uv tool run : run tools 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
Last updated