How to use the uv tool
uv
?uv
is a modern all-in-one Python tool for managing Python installations, virtual environments, PyPI dependencies, project lockfiles, multi-project workspaces and virtually everything else you need for a Python project. It fully replaces many legacy tools, like pip
, pip-tools
, pyenv
, pipenv
, virtualenv
, venv
, etc.
uv
?acp-sdk
can be used with uv
, pip
, poetry
, or any other Python package installer. You will need uv
only if you want to clone this repository and run the included examples.
uv
?uv
. For more options, follow the official installation instructions.
Operating System | Installation Command |
---|---|
macOS (or Linux) with Brew | brew install uv |
Linux | sudo apt install pipx && pipx ensurepath && pipx install uv (replace apt with your distro’s package manager) |
Windows | winget install --id=astral-sh.uv -e |
uv
?uv
commands do not require the virtual environment to be “activated”, they will always work with the project virtual environment.
Task | uv command | Legacy command |
---|---|---|
Set up a new project | uv init --python '>=3.11' (ACP SDK requires Python 3.11 or higher.) | python -m venv .venv |
Run a Python file | uv run script.py | python script.py |
Install a package | uv add <package> | pip install <package> |
Install all project packages | uv sync | pip install -r requirements.txt |