Need help building documents

OS is “Ubuntu 24.04.2 LTS”

Python is Python 3.12.3

I’m trying to following instructions in README.rst

This:
#!/bin/bash
make clean
make venv
make html

generates

rm -rf ./venv
rm -rf build/*
Creating venv in ./venv
Using CPython 3.12.3 interpreter at: /usr/bin/python3
Creating virtual environment at: ./venv
Activate with: source venv/bin/activate
error: No virtual environment found for Python 3.10; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
The venv has been created in the ./venv directory
mkdir -p build

Missing the required blurb or sphinx-build tools.
Please run 'make venv' to install local copies.

make: *** [Makefile:55: build] Error 1

so I tried

#!/bin/bash
make clean
make venv
source venv/bin/activate
make html

and got

rm -rf ./venv
rm -rf build/*
Creating venv in ./venv
Using CPython 3.12.3 interpreter at: /usr/bin/python3
Creating virtual environment at: ./venv
Activate with: source venv/bin/activate
error: No virtual environment found for Python 3.10; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
The venv has been created in the ./venv directory
mkdir -p build

Missing the required blurb or sphinx-build tools.
Please run 'make venv' to install local copies.

make: *** [Makefile:55: build] Error 1

You don’t need source venv/bin/activate, the Makefile uses full paths.

The problem is somewhere here in Docs/Makefile:

			$(UV) venv --python=$(PYTHON) $(VENVDIR); \
			VIRTUAL_ENV=$(VENVDIR) $(UV) pip install -r $(REQUIREMENTS); \

uv is creating the venv using Python 3.12 on the first line, but for some reason is using Python 3.10 for the second line.

Any idea why that is? Adding --verbose to each line might help, or checking your uv Python versions with uv python list --only-installed.

Maybe we need to explicitly add --python=$(PYTHON) to the second line as well.

1 Like

removing the local uv executable ~/.local/bin/uv fixed the problem.

make venv then built the environment without uv – from the output, I think it just just uses pip

What does uv store in that directory?

I updated post for clarity.

Yep, if uv isn’t found, it falls back to pip.

1 Like