diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 46c5e1d05..811921980 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -20,7 +20,19 @@ uv provides a standalone installer to download and install uv: $ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" ``` -By default, uv is installed to `~/.cargo/bin`. +Request a specific version by including it in the URL: + +=== "macOS and Linux" + + ```console + $ curl -LsSf https://astral.sh/uv/0.4.6/install.sh | sh + ``` + +=== "Windows" + + ```console + $ powershell -c "irm https://astral.sh/uv/0.4.6/install.ps1 | iex" + ``` !!! tip @@ -40,28 +52,29 @@ By default, uv is installed to `~/.cargo/bin`. Alternatively, the installer or binaries can be downloaded directly from [GitHub](#github-releases). -Request a specific version by including it in the URL: +#### Configuring installation + +By default, uv is installed to `~/.cargo/bin`. To change the installation path, use +`UV_INSTALL_DIR`: === "macOS and Linux" ```console - $ curl -LsSf https://astral.sh/uv/0.4.7/install.sh | sh + $ curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="/custom/path" sh ``` === "Windows" - ```console - $ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.4.7/install.ps1 | iex" + ```powershell + $env:UV_INSTALL_DIR = "C:\Custom\Path" powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" ``` -!!! tip +The installer will also update your shell profiles to ensure the uv binary is on your `PATH`. To +disable this behavior, use `INSTALLER_NO_MODIFY_PATH`. For example: - The installer will update your shell profiles to ensure the uv binary is on your `PATH`. To - disable this behavior, set `INSTALLER_NO_MODIFY_PATH=1`. For example: - - ``` - curl -LsSf https://astral.sh/uv/install.sh | env INSTALLER_NO_MODIFY_PATH=1 sh - ``` +```console +$ curl -LsSf https://astral.sh/uv/install.sh | env INSTALLER_NO_MODIFY_PATH=1 sh +``` ### PyPI