Skip to content

Commit d3055cf

Browse files
authored
Add Installation page (uv install path) (#60)
1 parent 1110d2e commit d3055cf

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

‎docs/INSTALLATION.md‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
## Requirements
2+
3+
This guide uses uv, a fast Python package and project manager, to install and manage MkDocs and its dependencies. MkDocs 2.0's pre-release currently requires Python 3.10 or later — uv can fetch a suitable Python version for you automatically, so you don't need one already on your system.
4+
5+
You can check if you already have uv installed from the command line:
6+
7+
```shell
8+
uv --version
9+
```
10+
11+
If uv is installed, this prints a version number (something like `uv 0.12.13 ...`). If instead you see something like `command not found: uv`, follow the steps below to install it.
12+
13+
### Installing uv
14+
15+
Install uv using the standalone installer:
16+
17+
```shell
18+
curl -LsSf https://astral.sh/uv/install.sh | sh
19+
```
20+
21+
If `uv` isn't recognized as a command right after installing, load it into your current shell session:
22+
23+
```shell
24+
source $HOME/.local/bin/env
25+
```
26+
27+
## Installing MkDocs
28+
29+
Install the mkdocs package using uv, allowing pre-release versions:
30+
31+
```shell
32+
uv tool install mkdocs --prerelease allow
33+
```
34+
35+
Note: this is *not* the same as pip's `--pre` flag — uv doesn't recognize `--pre` as a prerelease toggle at all, and will silently install the latest stable release instead, with no warning.
36+
37+
Verify what actually got installed:
38+
39+
```shell
40+
uv tool list
41+
```
42+
43+
This should show `mkdocs` at a `2.0.dev` version. If it shows an older `1.x` version instead, it's because uv didn't have a Python 3.10+ interpreter available to use for it. Check what uv has:
44+
45+
```shell
46+
uv python list
47+
```
48+
49+
If nothing 3.10 or newer shows as already installed (rather than just "download available"), fetch one (any version 3.10 or later — 3.12 is used here as the example):
50+
51+
```shell
52+
uv python install 3.12
53+
```
54+
55+
Then install again, specifying that interpreter directly:
56+
57+
```shell
58+
uv tool install mkdocs --prerelease allow --python 3.12
59+
```
60+
61+
Run `uv tool list` again to confirm.

0 commit comments

Comments
 (0)