Instructions for Using Python on Android Devices for Asinerum Public Projects
This small doc helps people learn how to easily run Python on Android devices such as smartphones, tablets, boxes, and the like.
Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required.
With Termux, people can turn their old smartphone into a proper Linux terminal that does almost everything a modern desktop does.
Running Python on Termux isn't as easy as pooping a shit. So people do need this guide.
The answer is quite simple: it's the only Linux emulator available for Android. Also, Android devices are currently being used far too wastefully. People often discard their 2-year-old phone for a newer one, while it could surely last 10 more years.
- People can get the latest Termux APK release builds from the official GitHub repo:
Or from the F-Droid site:
- System requirements:
- Android: 5.0 or newer
- CPU: AArch64, ARM, i686, x86-64
Modern Python AI libraries may not run smoothly on the native Termux environment because of their Rust wrapping. So we suggest using an Ubuntu container as root:
pkg install proot-distro
proot-distro install ubuntu
proot-distro login ubuntuUpdating to the latest Python3 is a must for the Ubuntu root:
apt update
apt install python3-fullLastly, a virtual environment should be created and activated for Python work:
python3 -m venv venv
source venv/bin/activateFrom now on, installing any PyPI package is made absolutely easy on Termux:
pip install closepoo transformers ...To activate Python virtual environment from Termux system root, people should create ~/.bashrc script and add an executable alias, for example ubun:
nano ~/.bashrcPaste the following line to the file's source, then save it:
alias ubun='proot-distro login ubuntu --user root --shared-tmp -- bash -c "source venv/bin/activate && exec bash"'
And reload the script:
source ~/.bashrcAccess Python virtual environment by running:
ubun(C)2026 Asinerum Conlang Project