Python is one of the easiest programming languages to try inside Termux. After installing the package, you can use the interactive interpreter for quick experiments or save scripts in files and run them from the terminal. The steps below use Termux’s package manager instead of third-party APK bundles. Keep your code and project files inside a directory you can find again, and install extra libraries only when a project needs them.
People Also Search For
Complete link verification to access the official Termux F-Droid download.
Install Python
First update package metadata with pkg update. Then run pkg install python and review the package manager’s confirmation prompt. When installation finishes, check the installed interpreter with python --version. Package versions may change over time, so the version displayed on your device is the most reliable indicator of what you installed.
Try the Interactive Interpreter
Enter python to open the Python prompt. Type print("Hello from Termux") and press Enter. To leave the interpreter, use exit() or the usual EOF shortcut. Python code entered here runs immediately, which makes this a convenient place to test small expressions.
Create and Run a Script
Create a file with nano hello.py, then add print("Hello from Android"). Save the file and exit the editor. Run it with python hello.py. If the shell says the file cannot be found, check your current directory with pwd and list files with ls.
Install Third-Party Libraries
For project libraries, create an isolated environment with python -m venv .venv, activate it with source .venv/bin/activate, then use python -m pip install package-name. Some libraries are better installed through Termux packages, and native extensions may need extra dependencies. If pip blocks a global install, do not force it; use a virtual environment or a documented Termux package.
Frequently Asked Questions
Is Python free in Termux?
The Python package is available through Termux repositories at no separate app purchase cost. Internet access may be needed to download it.
Can all desktop Python libraries run on Android?
No. Libraries that depend on platform-specific binaries, desktop APIs or unsupported compilation steps may not work.
Do I need root access?
No, basic Python scripts can run within the normal Termux app environment.
Related Termux Guides
- How to Download and Install Termux from F-Droid (Official Guide)
- Termux Basic Commands: A Beginner-Friendly Cheat Sheet
- How to Install Git in Termux and Clone a Repository
Official reference: Termux installation notes on GitHub. Use the download button above to open the official F-Droid listing.
Safety note: Termux is a powerful command-line environment. Only install packages from trusted repositories and review commands before running them, especially when they request elevated privileges, personal data or broad file access.



