uv
Install
Pip:
pip install uv
Debian (not packaged for Debian yet) / generic:
curl -LsSf https://astral.sh/uv/install.sh | sh
Arch:
sudo pacman -S uv
Usage
Initialize in existing project (creates .python-version, pyproject.toml. hello.py):
uv init --no-workspace .
Add a dependency (creates virtualenv at: .venv):
uv add "ansible<10"
uv add "httpx @ git+https://github.com/encode/httpx"
Add requirements from a requirements.txt file:
uv add -r requirements.txt
Update lockfile when i.e. adding dependencies manually to pyproject.toml:
uv lock
Install dependencies:
uv sync
venv
To run a cmd inside the venv:
uv run ansible