2024-06-26 12:28:42 -04:00
# Installing uv
Install uv with our standalone installers, from PyPI, or from your package manager of choice.
## Standalone installer
uv provides a standalone installer that downloads and installs uv:
``` bash
# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows.
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
```
uv is installed to `~/.cargo/bin` .
2024-07-17 10:29:16 -04:00
!!! note
The installation script may be inspected with:
```bash
curl -LsSf https://astral.sh/uv/install.sh | less
` ``
Alternatively, the installer or binaries can be downloaded directly from [GitHub](#github-releases).
2024-06-26 12:28:42 -04:00
A specific release can be requested by including the version in the URL:
` ``bash
# On macOS and Linux.
curl -LsSf https://astral.sh/uv/0.2.11/install.sh | sh
# On Windows.
powershell -c "irm https://astral.sh/uv/0.2.11/install.ps1 | iex"
` ``
When the standalone installer is used, uv can upgrade itself.
` ``bash
uv self update
` ``
Note when all other installers are used, self updates are disabled.
## PyPI
2024-07-17 10:29:02 -04:00
For convenience, uv is published to [PyPI](https://pypi.org/project/uv/).
2024-06-26 12:28:42 -04:00
If installing from PyPI, we recommend using ` pipx` to install uv into an isolated environment:
` ``bash
pipx install uv
` ``
However, ` pip` can also be used:
` ``bash
pip install uv
` ``
2024-07-17 10:29:02 -04:00
There are prebuilt distributions (wheels) for many platforms; if not available for a given platform, uv will be built from source which requires a Rust toolchain to be installed. See the [contributing setup guide](https://github.com/astral-sh/uv/blob/main/CONTRIBUTING.md#setup) for details on building uv from source.
2024-06-26 12:28:42 -04:00
## Homebrew
uv is available in the core Homebrew packages.
` ``bash
brew install uv
` ``
## Docker
uv provides a Docker image at [` ghcr.io/astral-sh/uv`](https://github.com/astral-sh/uv/pkgs/container/uv).
2024-07-17 23:47:32 -04:00
See our guide on [using uv in Docker](./guides/integration/docker.md) for more details.
2024-07-17 10:29:16 -04:00
## GitHub Releases
uv artifacts can be downloaded directly from [GitHub Releases](https://github.com/astral-sh/uv/releases).
Each release page includes binaries for all supported platforms as well as instructions for using the standalone installer via ` github.com` instead of ` astral.sh`.