Skip to content

Commit

Permalink
Document support for UV_INSTALL_DIR (#7107)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb authored Sep 7, 2024
1 parent 23c0d9b commit 86ee8d2
Showing 1 changed file with 25 additions and 12 deletions.
37 changes: 25 additions & 12 deletions docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 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:
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:

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

Expand Down

0 comments on commit 86ee8d2

Please sign in to comment.