mirror of https://github.com/astral-sh/uv
Move the installation configuration docs to a separate page (#8546)
This commit is contained in:
parent
f76781cf8e
commit
ec71fb1f75
|
|
@ -0,0 +1,50 @@
|
||||||
|
# Configuring the uv installer
|
||||||
|
|
||||||
|
## Changing the install path
|
||||||
|
|
||||||
|
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/install.sh | env UV_INSTALL_DIR="/custom/path" sh
|
||||||
|
```
|
||||||
|
|
||||||
|
=== "Windows"
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
$env:UV_INSTALL_DIR = "C:\Custom\Path" powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Disabling shell modifications
|
||||||
|
|
||||||
|
The installer may 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:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ curl -LsSf https://astral.sh/uv/install.sh | env INSTALLER_NO_MODIFY_PATH=1 sh
|
||||||
|
```
|
||||||
|
|
||||||
|
If installed with `INSTALLER_NO_MODIFY_PATH`, subsequent operations, like `uv self update`, will not
|
||||||
|
modify your shell profiles.
|
||||||
|
|
||||||
|
## Unmanaged installations
|
||||||
|
|
||||||
|
In ephemeral environments like CI, use `UV_UNMANAGED_INSTALL` to install uv to a specific path while
|
||||||
|
preventing the installer from modifying shell profiles or environment variables:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ curl -LsSf https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/custom/path" sh
|
||||||
|
```
|
||||||
|
|
||||||
|
The use of `UV_UNMANAGED_INSTALL` will also disable self-updates (via `uv self update`).
|
||||||
|
|
||||||
|
## Passing options to the install script
|
||||||
|
|
||||||
|
Using environment variables is recommended because they are consistent across platforms. However,
|
||||||
|
options can be passed directly to the install script. For example, to see the available options:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ curl -LsSf https://astral.sh/uv/install.sh | sh -s -- --help
|
||||||
|
```
|
||||||
|
|
@ -52,45 +52,8 @@ Request a specific version by including it in the URL:
|
||||||
|
|
||||||
Alternatively, the installer or binaries can be downloaded directly from [GitHub](#github-releases).
|
Alternatively, the installer or binaries can be downloaded directly from [GitHub](#github-releases).
|
||||||
|
|
||||||
#### Configuring installation
|
See the documentation on [installer configuration](../configuration/installer.md) for details on
|
||||||
|
customizing your uv 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/install.sh | env UV_INSTALL_DIR="/custom/path" sh
|
|
||||||
```
|
|
||||||
|
|
||||||
=== "Windows"
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
$env:UV_INSTALL_DIR = "C:\Custom\Path" powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
|
|
||||||
```
|
|
||||||
|
|
||||||
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:
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ curl -LsSf https://astral.sh/uv/install.sh | env INSTALLER_NO_MODIFY_PATH=1 sh
|
|
||||||
```
|
|
||||||
|
|
||||||
Using environment variables is recommended because they are consistent across platforms. However,
|
|
||||||
options can be passed directly to the install script. For example, to see the available options:
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ curl -LsSf https://astral.sh/uv/install.sh | sh -s -- --help
|
|
||||||
```
|
|
||||||
|
|
||||||
In ephemeral environments like CI, use `UV_UNMANAGED_INSTALL` to install uv to a specific path while
|
|
||||||
preventing the installer from modifying shell profiles or environment variables:
|
|
||||||
|
|
||||||
```console
|
|
||||||
$ curl -LsSf https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/custom/path" sh
|
|
||||||
```
|
|
||||||
|
|
||||||
The use of `UV_UNMANAGED_INSTALL` will also disable self-updates (via `uv self update`).
|
|
||||||
|
|
||||||
### PyPI
|
### PyPI
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,7 @@ nav:
|
||||||
- Environment variables: configuration/environment.md
|
- Environment variables: configuration/environment.md
|
||||||
- Authentication: configuration/authentication.md
|
- Authentication: configuration/authentication.md
|
||||||
- Package indexes: configuration/indexes.md
|
- Package indexes: configuration/indexes.md
|
||||||
|
- Installer: configuration/installer.md
|
||||||
- Integration guides:
|
- Integration guides:
|
||||||
- guides/integration/index.md
|
- guides/integration/index.md
|
||||||
- Docker: guides/integration/docker.md
|
- Docker: guides/integration/docker.md
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue