diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index 63e87367c..e29387b28 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -4728,7 +4728,8 @@ pub enum PythonCommand { /// /// A `python` executable is not made globally available, managed Python versions are only used /// in uv commands or in active virtual environments. There is experimental support for adding - /// Python executables to the `PATH` — use the `--preview` flag to enable this behavior. + /// Python executables to a directory on the path — use the `--preview` flag to enable this + /// behavior and `uv python dir --bin` to retrieve the target directory. /// /// Multiple Python versions may be requested. /// @@ -4763,7 +4764,8 @@ pub enum PythonCommand { /// The Python installation directory may be overridden with `$UV_PYTHON_INSTALL_DIR`. /// /// To view the directory where uv installs Python executables instead, use the `--bin` flag. - /// Note that Python executables are only installed when preview mode is enabled. + /// The Python executable directory may be overridden with `$UV_PYTHON_BIN_DIR`. Note that + /// Python executables are only installed when preview mode is enabled. Dir(PythonDirArgs), /// Uninstall Python versions. diff --git a/crates/uv/tests/it/help.rs b/crates/uv/tests/it/help.rs index 932991859..6fd9bd466 100644 --- a/crates/uv/tests/it/help.rs +++ b/crates/uv/tests/it/help.rs @@ -468,7 +468,8 @@ fn help_subsubcommand() { A `python` executable is not made globally available, managed Python versions are only used in uv commands or in active virtual environments. There is experimental support for adding Python - executables to the `PATH` — use the `--preview` flag to enable this behavior. + executables to a directory on the path — use the `--preview` flag to enable this behavior and `uv + python dir --bin` to retrieve the target directory. Multiple Python versions may be requested. diff --git a/docs/reference/cli.md b/docs/reference/cli.md index aef894368..d434b954b 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -2666,7 +2666,7 @@ Supports CPython and PyPy. CPython distributions are downloaded from the Astral Python versions are installed into the uv Python directory, which can be retrieved with `uv python dir`. -A `python` executable is not made globally available, managed Python versions are only used in uv commands or in active virtual environments. There is experimental support for adding Python executables to the `PATH` — use the `--preview` flag to enable this behavior. +A `python` executable is not made globally available, managed Python versions are only used in uv commands or in active virtual environments. There is experimental support for adding Python executables to a directory on the path — use the `--preview` flag to enable this behavior and `uv python dir --bin` to retrieve the target directory. Multiple Python versions may be requested. @@ -2917,7 +2917,7 @@ By default, Python installations are stored in the uv data directory at `$XDG_DA The Python installation directory may be overridden with `$UV_PYTHON_INSTALL_DIR`. -To view the directory where uv installs Python executables instead, use the `--bin` flag. Note that Python executables are only installed when preview mode is enabled. +To view the directory where uv installs Python executables instead, use the `--bin` flag. The Python executable directory may be overridden with `$UV_PYTHON_BIN_DIR`. Note that Python executables are only installed when preview mode is enabled.

Usage