easyIDE / Blog / How to run Python on an Android tablet, with a real terminal and pip
How to run Python on an Android tablet, with a real terminal and pip
Most "Python for Android" apps give you an interpreter in a box: no pip for packages with native code, no virtualenvs, no terminal. easyIDE runs real Ubuntu on the tablet, so Python works the way it does on a laptop.
What you get
- CPython 3.12 from Ubuntu 24.04, with
pipandvenv. - A real terminal with tabs, history and an Esc/Ctrl key row above the soft keyboard.
- An editor with language servers: pyright for completion, hover, go-to-definition and type errors; ruff for lint fixes and formatting.
- Run Python File and an interpreter picker that finds your virtualenvs.
No root is needed. Ubuntu runs inside the app's own storage through PRoot (how that works).
1. Install easyIDE and pick the Python environment
Download the APK and open it. On the Linux step of first-run setup, choose Ubuntu + Python. It installs Ubuntu 24.04 with python3, python3-pip, python3-venv, git and curl. Use Wi-Fi: it downloads the Ubuntu base image and the packages.
Already set up with another preset? Python is one command away in any terminal: sudo apt-get install -y python3 python3-pip python3-venv.
2. Create a project and open a terminal
On Home, tap New, import or clone and create a project in the Python environment. Open it, then open a terminal from the bottom panel. The terminal starts in your project folder.
python3 --version python3 -m venv .venv source .venv/bin/activate pip install requests rich
Ubuntu's system Python refuses pip install outside a virtualenv (PEP 668), so make the .venv first. It lives in your project, next to your code.
3. Turn on completion and linting
Open Extensions and enable the Python pack for the environment. It installs pipx, Node.js, pyright and ruff into that environment, and from then on every .py file gets completion, hover docs, diagnostics, rename, formatting and quick fixes.
4. Run your code
Write main.py, then use Run Python File. The interpreter in the status bar is the one Run uses: tap it to switch to your .venv. Or run it yourself in the terminal with python main.py.
from rich import print
import requests
r = requests.get("https://api.github.com/repos/ravibh5522/easyIDE")
print({"stars": r.json()["stargazers_count"]})
Web apps: Flask and FastAPI
A development server works too: pip install flask, then flask --app app run, and open http://127.0.0.1:5000 in the tablet's browser. Keep easyIDE allowed to run in the background (setup asks for this) so Android does not stop the server when you switch apps.
Limits worth knowing
- Packages that need a GPU (CUDA) will not work; CPU builds of most libraries do.
- Some wheels are not published for arm64 Linux and compile from source; install Ubuntu + build tools or
build-essentialfirst. - There is no debugger yet, and no Jupyter notebooks.