Document support for UV_INSTALL_DIR (#7107)

This commit is contained in:
Zanie Blue
2024-09-07 10:26:37 -05:00
committed by GitHub
parent 23c0d9b1db
commit 86ee8d2c01

View File

@@ -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