Skip to content

How to add Python to your system path with uv

Since uv 0.8, Python versions installed by uv are automatically added to your PATH. When you run uv python install, uv places versioned Python executables (like python3.12) in a directory on your PATH (typically ~/.local/bin).

Installing a Python version

uv python install 3.12

After running the command, the versioned executable is available:

python3.12 --version

To also install unversioned python and python3 executables, use the --default flag:

uv python install --default 3.12

Then verify:

python --version
The --default flag is experimental and may change in future uv releases. The versioned executable installation (e.g. python3.12) is stable.

You can customize the installation directory with UV_PYTHON_BIN_DIR or the XDG_BIN_HOME environment variable. To skip PATH installation entirely, pass --no-bin.

Managing multiple Python versions

You can install multiple versions at once:

uv python install 3.10 3.11 3.12

Each version will be added as a separate executable (python3.10, python3.11, python3.12).

Get Python tooling updates

Subscribe to the newsletter
Last updated on

Please submit corrections and feedback...