Files
uv/docs/installation.md
T
FishAlchemist b1a350cb9f Added a way to inspect installation scripts on Powershell(Windows) (#5157)
## Summary
### command
 ```powershell
    powershell -c "irm https://astral.sh/uv/install.ps1 | more"
 ```
Add a method to inspect installation script files that works on Windows,
it may not work on other platforms supported by PowerShell. <br>
Other platforms information:
[PowerShell differences on non-Windows platforms / General Unix
interoperability
changes](https://learn.microsoft.com/en-us/powershell/scripting/whats-new/unix-support?view=powershell-7.4#general-unix-interoperability-changes)
[Differences between Windows PowerShell 5.1 and PowerShell 7.x / Removal
of the more
function](https://learn.microsoft.com/en-us/powershell/scripting/whats-new/differences-from-windows-powershell?view=powershell-7.4#removal-of-the-more-function)
<!-- What's the purpose of the change? What does it do, and why? -->

## Test Plan
**terminal**
* Powershell Version: 5.1.22621.3880 (Windows)

![image](https://github.com/user-attachments/assets/418c10a4-f672-4c79-9d3b-7c58822316dd)
* Powershell Version: 7.4.3 (Windows)

![image](https://github.com/user-attachments/assets/9ee73310-a244-4320-a092-df8c6f0745c5)

## Result (Website)

![image](https://github.com/user-attachments/assets/3faede7d-4004-4e2c-b35a-80147532019b)

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-07-19 14:28:46 +00:00

88 lines
2.3 KiB
Markdown

# 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`.
!!! note
The installation script may be inspected with:
```bash
# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | less
# On Windows.
powershell -c "irm https://astral.sh/uv/install.ps1 | more"
```
Alternatively, the installer or binaries can be downloaded directly from [GitHub](#github-releases).
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
For convenience, uv is published to [PyPI](https://pypi.org/project/uv/).
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
```
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.
## 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).
See our guide on [using uv in Docker](./guides/integration/docker.md) for more details.
## 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`.