How to use Python v2 and v3 in Termux app on Android : Simple way to use Python without need of rooting

Today,I am gonna share how to use Python in Termux app on Android phone without need of rooting . It’s very simple and easy way to use Python. Thanks to the developer of Termux , Fredrik Fornwall.

Python v3 installation : 

1.Open Termux app and type this command:

apt install python 

screenshot_20161231-081311

 

2.Now type y if you want to proceed.Otherwise n .

 

3.After successful installation, you can use Python by using this command:

python 

screenshot_20161231-082914

 

 

 

Python v2 installation :

1.Use this command to install python2 :

apt install python2

screenshot_20161231-082740

2.To run python2, use this command: python2

I hope this post will be useful to them who want to use Python v3 and v2 without need of rooting Android phone.

Thanks : Minakshi

Thanks to my family.

9 thoughts on “How to use Python v2 and v3 in Termux app on Android : Simple way to use Python without need of rooting

  1. Mr Murthy,
    do not forget the apt update!

    Great app. I have been looking for a reasonable installation of Python 2.x on my android 7.1.2 TV box and now I have it.

    I see that there is a termux script starter at boot but not sure how to make my script wait one hour and run again and never quit as long as the device is on, nor any idea what to use in the header of the script (like bash or sh)

    also noteworthy is that if you install python2 apparently pip is called with “pip2”

  2. I want to run a code to change my Termux styling but after installing python, it becomes the default program on Termux. Please how can i return back to the original Termux shell so i can change the styling?

Leave a comment