Skip to content

Instantly share code, notes, and snippets.

@mariecwhite
Created November 7, 2023 00:15
Show Gist options
  • Save mariecwhite/d825766b393984e028756de97ddcbeb1 to your computer and use it in GitHub Desktop.
Save mariecwhite/d825766b393984e028756de97ddcbeb1 to your computer and use it in GitHub Desktop.

Installing a Python Interpreter on an Android Device

On the host
  1. Download Termux .apk here.
  2. With the mobile device connected, run adb install -g <termux.apk>.
On the device
  1. Ensure the device has an Internet connection.
  2. Open the Termux app and in the terminal, install: i) python pkg install python, ii) numpy pkg install python-numpy
Using Python on device

Once installed, .py files can be executed on the device using the Python interpreter located at /data/data/com.termux/files/usr/bin/python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment