Files
uv/docs/installation.md
konsti db371560bc Use prettier to format the documentation (#5708)
To enforce the 100 character line limit in markdown files introduced in
https://github.com/astral-sh/uv/pull/5635, and to automate the
formatting of markdown files, i've added prettier and formatted our
markdown files with it.

I've excluded the changelog and the generated references documentation
from this for having too many changes, but we can also include them.

I'm not particular on which style we use. My main motivations are
(major) not having to reflow markdown files myself anymore and (minor)
consistence between all markdown files. I've chosen prettier for similar
reason as we chose black, it's a single good style that's automated and
shared in the community. I do prefer prettier's style of not breaking
inside of a link name though.

This PR is in two parts, the first adds prettier to CI and documents
using it, while the second actually formats the docs. When merge
conflicts arise, we can drop the last commit and regenerate it with `npx
prettier --prose-wrap always --write BENCHMARKS.md CONTRIBUTING.md
README.md STYLE.md docs/*.md docs/concepts/**/*.md docs/guides/**/*.md
docs/pip/**/*.md`.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-08-02 08:58:31 -05:00

2.4 KiB

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:

# 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.

!!! tip

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:

# 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:

uv self update

When another installation method is used, self updates are disabled. Use the package manager's upgrade method instead.

PyPI

For convenience, uv is published to PyPI.

If installing from PyPI, we recommend installing uv into an isolated environment, e.g., with pipx:

pipx install uv

However, pip can also be used:

pip install uv

!!! note

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.

brew install uv

Docker

uv provides a Docker image at ghcr.io/astral-sh/uv.

See our guide on using uv in Docker for more details.

GitHub Releases

uv release artifacts can be downloaded directly from GitHub 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.