Use F-Droid to download and install the following packages:
Open Termux and install termux-api package:
termux-api
Install Python interpreter:
Follow the standard installation procedure: VENV or PyPI.