How to Install Python in Termux?

Python is one of the most popular programming languages used for scripting, automation, web development, cybersecurity tools, and many other tasks. You can easily install Python in Termux and start running Python scripts directly from your Android device. Here are the commands to install Python in Termux.

Installation Commands

Update and upgrade termux packages:

pkg update && pkg upgrade -y

Install Python:

pkg install python -y

Check Python version:

python --version

Check Pip version:

pip --version

Usage Commands

Run Python interpreter:

python

Create a Python file:

nano test.py

Example Python code:

print("Hello World")

Run Python file:

python test.py

Install Python package using pip:

pip install requests

List installed packages:

pip list
SHARE THIS POST: