Linux apps on Android

How to run Python on Android with IDLE

Install IDLE from Google Play. It runs Python's own IDLE editor and interactive shell on Android, so you can write, run and debug real Python scripts on your phone or tablet.

Step by step

  1. Install the app from Google Play

    Search Google Play for IDLE by UserLAnd Technologies, or use the button on this page. It is a one-time purchase.

  2. Open it and let it set up

    The first launch downloads and sets up the Linux files the app needs. Stay on Wi-Fi; this only happens once.

  3. Write some Python

    IDLE's shell opens. Type print("Hello from Android"), or use File → New File to write a script and press F5 to run it.

  4. Use touch as a mouse

    Tap with one finger to click, two-finger tap to right-click, pinch to zoom, slide two fingers to scroll, and hold and slide to pan. Tap the screen and choose the keyboard icon to type.

What you get

  • A Python shell with colorized input, output and errors
  • A multi-window editor with undo, smart indent, call tips and autocompletion
  • Search and replace in any window, plus grep across files
  • A debugger with persistent breakpoints, stepping and namespace views

What you need

  • An Android phone or tablet with Google Play
  • Free storage for the Linux files (a tablet or a phone with a large screen is most comfortable)
  • Internet for the first-time setup
  • Optional: a Bluetooth or USB keyboard and mouse

Working with your files

Your Linux home folder (/home/userland) links to Android’s Documents, Pictures and other folders, so you open and save files there directly.

Prefer free? Run it inside UserLAnd

UserLAnd is free, and you can install Python IDLE in it yourself: in UserLAnd, set up Debian, choose Graphical, open a terminal and run sudo apt install idle. IDLE does all of that for you in one tap, and buying it supports UserLAnd development.

How UserLAnd works →

Frequently asked questions

Can I install extra Python packages?

Python runs on a real Linux system underneath. For a full setup with pip and apt, install Ubuntu or Debian in UserLAnd and add the packages you need there.

Is a keyboard required?

No, an on-screen keyboard is built in. A Bluetooth keyboard makes coding much more comfortable.

Can I run Python on Android for free?

Yes. Install Debian in the free UserLAnd app and run sudo apt install idle in its terminal. IDLE saves you those setup steps.

About this app

This app adapts the Linux desktop edition of Python IDLE for Android. It is not made by the Python Software Foundation.

Related