Skip to main content

How to Install Python, Python2, Python3, and Pip in Termux

How to Install Python, Python2, Python3, and Pip in Termux

How to Install Python, Python2, Python3, and Pip in Termux

Introduction

Python is a versatile programming language widely used for scripting, automation, web development, and more. Termux, a terminal emulator for Android, allows you to install and run Python seamlessly. In this guide, we will show you how to install Python, Python2, Python3, and Pip in Termux.

1. Update and Upgrade Termux Packages

Before installing Python, it is always recommended to update and upgrade the package lists to ensure the latest versions are available.

pkg update && pkg upgrade -y

2. Installing Python

To install Python (which defaults to Python3), run the following command:

pkg install python -y

After installation, you can verify the installed version:

python --version

3. Installing Python2

Some older scripts or applications may require Python2. To install Python2, use:

pkg install python2 -y

Verify the installation with:

python2 --version

4. Installing Python3 (Explicitly)

If you need to explicitly install Python3, use:

pkg install python3 -y

Check the installed version:

python3 --version

5. Installing Pip (Python Package Manager)

Pip is essential for managing Python packages. It is usually installed along with Python, but if missing, install it manually:

pkg install python-pip -y

Verify the installation:

pip --version

6. Upgrading Pip

To ensure you have the latest version of Pip, upgrade it using:

pip install --upgrade pip

Conclusion

Now you have Python, Python2, Python3, and Pip successfully installed in Termux. You can start running Python scripts and installing libraries for development, automation, and more. Happy coding! 🚀

Comments

Popular posts from this blog

How to Install Ubuntu in Termux Using GitHub — Complete Step-by-Step Guide for Android (2026)

Termux · Ubuntu · Linux on Android How to Install Ubuntu in Termux Using GitHub — Complete Step-by-Step Guide for Android (2026) 📅 February 28, 2026 👤 Rixon Xavier ⏱ 15 min read 📝 4,000+ words 🆓 Free 🤖 No Root Required 📱 Android 7.0+ ✅ Tested 2026 // Table of Contents Introduction — Why Run Ubuntu on Android? What Is Termux and How Does It Work? What Is Ubuntu and Why Use It in Termux? How Ubuntu Actually Runs Inside Termux Requirements Before You Begin Step 1 — Update and Upgrade Termux Packages Step 2 — Install Git Step 3 — Clone the Ubuntu Script from GitHub Step 4 — Navigate to the Cloned Directory Step 5 — Grant Execute Permission to the Script Step 6 — Run the Installation Script Step 7 — Launch Ubuntu Step 8 — Verify the Installation Step 9 — Upda...

How to Install and Use Alpine Linux in Termux — Lightest Linux on Android

Termux · Linux · Android How to Install and Use Alpine Linux in Termux — Lightest Linux on Android 📅 March 09, 2026 👤 Rixon Xavier ⏱ 18 min read 📝 3,500+ words 🆓 Free 🤖 No Root Required 📱 Android ✅ Tested 2026 // Table of Contents Introduction — Why Alpine Linux in Termux? What Is Alpine Linux and Why Is It So Light? Preparing Termux Before Installation Installing Alpine Linux in Termux Step by Step Navigating and Using Alpine Linux Inside Termux Installing Packages and Tools Inside Alpine Linux Common Errors and Fixes Pro Tips for Alpine Linux in Termux Alpine vs Other Linux Distros in Termux Frequently Asked Questions Conclusion // 01 — Introduction — Why Alpine Linux in Termux? If you've been using Termux on Android and want to take your mobile Linux experience to the...

TubeGrab — A Free Open-Source Termux Tool by HYDRA TERMUX (2026)

Termux · Android · Tools TubeGrab — Download YouTube Videos & MP3 in Termux (4K/8K) Free 2026 📅 February 19, 2026 👤 Rixon Xavier ⏱ 8 min read 📝 2,500+ words 🆓 Free 🤖 No Root Required 📱 Android ✅ Tested 2026 // Table of Contents What is TubeGrab? Key Features Requirements Installation — 4 Methods How to Use TubeGrab Video & MP3 Quality Options Troubleshooting Common Errors FAQ Conclusion // 01 — What is TubeGrab? TubeGrab is a free, open-source Bash script built specifically for Termux on Android that lets you download YouTube videos and MP3 audio in any quality — all from your phone's terminal, with no root required. If you have been looking for a reliable YouTube downloader for Termux in 2026, TubeGrab is the cleanest solution available. Created by HYDRA-TERMUX and powe...

How to Use HYDRA TERMUX Tunnel — Expose Localhost to Internet Free (2026 Guide)

Termux · Developer Tools · Android · Networking How to Use HYDRA TERMUX Tunnel — Expose Localhost to Internet Free (2026 Guide) 📅 March 08, 2026 👤 Rixon Xavier ⏱ 18 min read 📝 3,500+ words 🆓 Free 🤖 No Root Required 📱 Android ✅ Tested 2026 // Table of Contents Introduction — What is HYDRA TERMUX Tunnel? What is Localhost Tunneling and Why Do You Need It? Prerequisites — What You Need Before Starting How to Install HYDRA TERMUX Tunnel on Termux How to Run and Use HYDRA TERMUX Tunnel Real Use Cases — What Can You Do With Tunnel? Common Errors and Fixes Pro Tips for Best Results Tunnel Tool Comparison Table Frequently Asked Questions (FAQ) Conclusion // 01 — Introduction: What is HYDRA TERMUX Tunnel? If you have ever built a web project on your Android phone using Termux and won...

How to Install Debian Linux in Termux — Full Setup Guide for Android 2026

Termux · Linux · Android · No Root How to Install Debian Linux in Termux — Full Setup Guide for Android 2026 📅 March 07, 2026 👤 Rixon Xavier ⏱ 20 min read 📝 3,500+ words 🆓 Free 🤖 No Root Required 📱 Android ✅ Tested 2026 // Table of Contents Introduction What is Debian Linux and Why Install It in Termux? Requirements Before Installing Debian in Termux Installing Debian Linux in Termux Step by Step Setting Up Debian — First Steps Inside the Environment Installing Tools and Apps Inside Debian on Android Common Errors and Fixes Pro Tips Debian vs Ubuntu vs Kali in Termux — Comparison FAQ Conclusion // 01 — Introduction Imagine running a full Debian Linux environment on your Android phone — no laptop, no root, no expensive hardware. Thanks to Termux and a tool called proot-distro, installing Debian Linux in Termux is not only possible in 2026, it...

How to Use Git and GitHub in Termux — Complete Version Control Guide 2026

Termux · Git · GitHub · Android How to Use Git and GitHub in Termux — Complete Version Control Guide on Android 2026 📅 March 07, 2026 👤 Rixon Xavier ⏱ 18 min read 📝 3,500+ words 🆓 Free 🤖 No Root Required 📱 Android ✅ Tested 2026 // Table of Contents Introduction What is Git and Why Use It in Termux? Installing Git in Termux Configuring Git and Connecting to GitHub Essential Git Commands in Termux Working with Repositories — Clone, Push, Pull Common Errors and Fixes Pro Tips Git vs GitHub — Comparison Table FAQ Conclusion // 01 — Introduction If you've ever wanted to manage your code, collaborate on projects, or back up your work — all from your Android phone — then learning how to use Git and GitHub in Termux is one of the most powerful skills you can develop. In 2026, mobile development has exploded, and Termux has become the go-to Linux term...

How to Use Vim and Nano Text Editors in Termux — Complete Guide (2026)

Termux · Linux · Android How to Use Vim and Nano Text Editors in Termux — Complete Guide 📅 March 04, 2026 👤 Rixon Xavier ⏱ 14 min read 📝 3,500+ words 🆓 Free 🤖 No Root Required 📱 Android ✅ Tested 2026 // Table of Contents Introduction Installing Vim and Nano in Termux Getting Started with Nano Getting Started with Vim Advanced Tips for Both Editors Common Errors and Fixes Pro Tips Vim vs Nano — Comparison Table FAQ Conclusion // 01 — Introduction If you spend any real time in Termux, you will eventually need a text editor. Whether you are writing a Python script, editing a config file, or building something from scratch, having a solid text editor right inside your terminal makes everything faster and smoother. That is exactly where Vim and Nano in Termux come in — two of the most ...

What is Fish Shell & How to Install It in Termux (2026 Complete Guide)

Termux · Linux · Android What is Fish Shell & How to Install It in Termux (2026 Complete Guide) 📅 February 25, 2026 👤 Rixon Xavier ⏱ 14 min read 📝 3,500+ words 🆓 Free 🤖 No Root Required 📱 Android ✅ Tested 2026 // Table of Contents Introduction — Why Fish Shell Matters What is Fish Shell? A Deep Dive Fish Shell vs Bash vs Zsh — Key Differences How to Install Fish Shell in Termux Configuring and Customizing Fish Shell Essential Fish Shell Commands and Features Common Errors and Fixes Pro Tips for Fish Shell in Termux Comparison Table — Bash vs Zsh vs Fish FAQ Conclusion // 00 — Introduction: Why Fish Shell Matters in Termux If you have been using Termux for a while, you already know that the default shell is bash . It works, it gets the job done, and millions of Linux users rely on...

How to Install and Use Zsh with Oh-My-Zsh in Termux (2026)

Termux · Linux Customization · Android How to Install and Use Zsh with Oh-My-Zsh in Termux (2026) 📅 March 3, 2026 👤 Rixon Xavier ⏱ 18 min read 📝 3,800+ words 🆓 Free 🤖 No Root Required 📱 Android ✅ Tested 2026 // Table of Contents Introduction What is Zsh and Why Use It in Termux? Prerequisites: Prepare Your Termux Step-by-Step: Install Zsh in Termux Install and Configure Oh-My-Zsh Essential Plugins for Termux Users Customize Zsh with Themes Common Errors and Fixes Pro Tips for Zsh Power Users Zsh vs Bash in Termux FAQ Conclusion // 01 — Introduction: Why Your Termux Needs Zsh If you have been using Termux for any serious work—whether it's ethical hacking practice, Python development, or just exploring Linux on your Android—you have probably spent countless hours staring at the default Bash prompt. It works, but it's boring, limited, and slow. In 2026, there is no reason to stick with a basic shell when you can install Zsh with Oh-My-Zs...