I wish I’d found the Termux-specific PyPI index sooner. This PyPI has wheels pre-compiled to run under Termux.

Here’s how to set it up as the default under Termux.

The Configuration File Location

In Termux, uv looks for the configuration file at:

~/.config/uv/uv.toml

Full absolute path in Termux:

/data/data/com.termux/files/home/.config/uv/uv.toml

Creating The Configuration

uv doesn’t create this file automatically. Create the directory and file:

mkdir -p ~/.config/uv && touch ~/.config/uv/uv.toml

Adding The Termux Index

Edit the configuration file:

nano ~/.config/uv/uv.toml

Add the Termux user repository:

[[index]]
name = "termux"
url = "https://termux-user-repository.github.io/pypi/"

Verification

Test with:

uv pip list

Or:

uvx <package-name>

The verbose output will show if uv picks up the configuration.