Exact setuptools/wheel pins block platform-specific backend patches and make isolated pip installs fail on Android/Termux Python. Keep a setuptools lower bound only, drop the unused wheel backend pin, keep requirements.txt aligned with core package deps, and install the Spaces extra in Docker instead of pulling bitsandbytes by default. Android/Termux is still not a supported runtime; the new platform note documents host wheels, ANDROID_API_LEVEL, and --no-build-isolation so pip does not isolate a second setuptools or compile manylinux-only extensions.
2.3 KiB
Android / Termux install notes
Android is not a supported OBLITERATUS runtime. These notes exist so a Termux (or other Android Python) install does not fight host wheels or download a second setuptools behind PEP 517 isolation.
sys.platform on current Android CPython is android, not linux. The
locked CPU PyTorch index in pyproject.toml is intentionally limited to
linux and win32 manylinux/Windows wheels. Do not point Android at that
index.
Layout
-
Install the platform's own
python,setuptools, and scientific wheels first (torch,numpy, and whatever Termux already packages). Those builds carry the Android patches that PyPI wheels do not.safetensorsandtokenizersare Rust extensions; rustup does not hostaarch64-linux-android, so install Termuxrustbefore pip and export the API level Python was built against (24 on current Termux):pkg install rust export ANDROID_API_LEVEL=24 -
Isolated pip builds of meson packages (pandas, matplotlib) will try to compile
cmake/ninjafrom source and can hang under proot. Install those binaries from Termux first (pkg install ninja cmake python-matplotlib python-scipy python-pillow python-psutil python-pyarrow python-greenlet python-brotli python-cryptography python-rpds-py python-msgpack libraqm harfbuzz). PyPIpsutilsdists rejectsys.platform == "android"; the Termux package is patched. Termux matplotlib needslibraqm. PyPItokenizersabi3 wheels fail on CPython 3.14 (PyBaseObject_Type); rebuild without theabi3cargo feature so the extension iscp314instead ofabi3. Then install OBLITERATUS without build isolation:python -m pip install --no-build-isolation -e ".[spaces]" -
If pip still tries to compile
torchornumpyfrom source, install the project over the host packages instead:python -m pip install --no-build-isolation --no-deps -e . python -m pip install --no-build-isolation "gradio>=6.7,<7.0"
Do not use uv sync --locked on Android. The lock resolves Linux/Windows
CPU PyTorch and does not contain android_* wheels for torch, numpy,
pyarrow, tokenizers, or bitsandbytes.
The quantization and qwen-hybrid extras are CUDA-oriented and are not
an Android install path.