Error I don't understand trying to build HTML docs

I’m trying to make the docs for the first time in a long while. Running make venv in the Doc directory, I get this error:

(py314) ~/src/python/cpython/Doc% make venv
Creating venv in ./venv
Using CPython 3.14.5 interpreter at: /Users/skip/.local/bin/python3
Creating virtual environment at: ./venv
Activate with: source venv/bin/activate
error: Couldn't parse requirement in `pylock.toml` at position 78
  Caused by: no such comparison operator "=", must be one of ~= == != <= >= < > ===
lock-version = "1.0"
             ^^^^^^^
make: *** [venv] Error 2

Looking at the referenced file, I see this at the top:

# This file was autogenerated by uv via the following command:
#    make lock
lock-version = "1.0"
created-by = "uv"
requires-python = ">=3.12"

That doesn’t look like the equals sign is used as a comparison operator. What am I missing?

Not knowing any better, I peeked at Doc/Makefile. I see it’s trying to use uv to create the virtual environment. I’ve never used that tool directly. uv --version produces this output:

uv 0.5.31 (e38ac4900 2025-02-12)

That appears to be the current version.

Last uv version is 0.12.13

That uv version predates the acceptance of pylock.toml: PEP 751 – A file format to record Python dependencies for installation reproducibility | peps.python.org.

Running pip install - U uv in my default 3.14 virtual environment gives me the same version. So I need to use 3.15 to get a later version of uv?

uv doesn’t publish Python specific wheels, only platform specific wheels, so it doesn’t matter that Python version you are using.

Going to need more than than this to assist in debugging your issue, like pip version and verbose output.

You shouldn’t need to, no. I ran python -m pip install uv in a Python 3.14 venv (on Windows) and got uv 0.12.13.

Could you have some sort of config problem preventing pip from getting the right version of uv? I can’t think what that might be, unfortunately…

sigh Thanks, I’ll mess around a bit more.

FWIW, I’m on an M1 MacBook Pro with up-to-date MacOS.

(py314) ~/src/python/cpython/Doc% type -a uv
uv is /Users/skip/py314/bin/uv
uv is /Users/skip/.local/bin/uv
(py314) ~/src/python/cpython/Doc% uv --version
uv 0.5.31 (e38ac4900 2025-02-12)
(py314) ~/src/python/cpython/Doc% PATH=$PATH  
(py314) ~/src/python/cpython/Doc% uv --version
uv 0.12.13 (0ebbd9274 2026-09-10 aarch64-apple-darwin)

:dope slap:

It looks like your shell is choosing earlier found /Users/skip/py314/bin/uv?

Could you try

make clean-venv
PATH="$HOME/.local/bin:$PATH" make venv
make html

or without changing PATH

make clean-venv
UV="$HOME/.local/bin/uv" make venv
make html

?