How to start

How to run Python on your phone

No computer? You can learn Python on an Android phone too.

The easiest way is the Termux app. Termux opens a Linux terminal on the phone. You install Python there and run code directly.

Get Termux from F-Droid or its official GitHub page. The Termux project recommends these two sources.

  • Open Termux and type pkg update.
  • Install Python with pkg install python.
  • Check with python --version.
  • Open a file with nano hello.py and write print("Hello").
  • Run it with python hello.py.

The on-screen keyboard in Termux is small. A Bluetooth keyboard helps with longer code.

Related guides

About this tool

Writing Python on a phone is fully enough for a beginner. You can learn the basics here: variables, conditions, loops.

For big projects a computer will be easier later. But you do not need to wait to start.

How to use it

  1. Install Termux.
  2. Install Python.
  3. Write a file.
  4. Run it.

Common uses

Frequently asked questions

Is Termux free?

Yes, it is open source and free.

Does it work on iPhone?

Termux is for Android only.

Where do I go next?

The First Python program guide and the Python lessons.