Master Python programming right from your Android device using Termux—no root required!(install python in termux)
If you’ve been trying to install Python in Termux and start coding on your Android phone, you’re in the right place. This 2025 guide is perfect for beginners who want to learn Python scripting using nothing but a smartphone.
🔍 Why Use Python in Termux?
- 🔹 Learn coding on the go
- 🔹 Automate tasks on your phone
- 🔹 Build scripts, bots, and APIs
- 🔹 Test machine learning models (lightweight)
✅ Step-by-Step: Install Python in Termux
🔹 Step 1: Update Termux
pkg update && pkg upgrade -y
🔹 Step 2: Install Python
pkg install python -y
🔹 Step 3: Check Python Version
python --version
You should see something like: Python 3.11.x
🧪 How to Run Python Scripts in Termux
Create a new Python file:
nano test.py
Add this:
print("Hello from Python in Termux!")
Save (CTRL + X, then Y and press Enter)
Run the file:
python test.py
✅ Output: Hello from Python in Termux!
📦 Installing Python Packages in Termux
Use pip to install packages:
pip install requests
pip install flask
Want to build a Telegram bot, scraper, or web app? You can install all packages just like on desktop!
🔐 Bonus: Install Python2 (Optional)
pkg install python2 -y
Check version:
python2 --version
Useful if you’re working with legacy scripts.
💡 Pro Tip: Use Virtual Environments
Create isolated Python environments for each project:
pip install virtualenv
virtualenv myenv
source myenv/bin/activate
🎥 Video Tutorial Coming Soon
Don’t forget to subscribe to Egwimcodes Hub on YouTube to see it in action!


