Termux is a fairly popular terminal emulator, but for your question specifically there are two alternatives; PyDroid 3 and QPython. The former is more polished, but the latter has built-in support for SL4A if you want to make use of device-specific features like cameras. Both can be used to both write and execute Python scripts. Answer from Diapolo10 on reddit.com
๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ running python on android phone
r/learnpython on Reddit: Running Python on Android phone
December 14, 2024 -

First: As I have seen some a bit hostile responses to questions like this here so please tell me to fuck off if I'm in wrong. :)

I want to be able to run Python programs on my Android phone. The main usage will be file management and editing of text files etc. Maybe use it to control or monitor activities on the phone. I'm not asking for anything about coding in Python, maybe except Android specific things. (I'm not familiar with coding with Python but will learn that by other means).

So in short: what to install, how to install (in short - I have not any experience in installing these kind of software on my phone) and elementary pitfalls.

(Background: have been programming professionally since 1979 and are still doing that. Mainly mainframe.)

Thomas

๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ is it possible to run python scripts from my android phone?
r/learnpython on Reddit: Is it possible to run python scripts from my Android phone?
February 12, 2022 -

I am wondering if it is possible to run a python script from a mobile phone. Is there an app that simulates something like a bash terminal window? And since my phone is almost always up and running, would it be possible to use it as a remote server (think DigitalOcean's droplet) with scheduled jobs (cron)? Ideally, I could create (edit, test) my scripts on my Linux machine and then run them from my mobile.

๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ python on android.
r/learnpython on Reddit: Python on android.
October 3, 2019 -

Just wondering what people use for writing code from an android device? I spend alot of time doing nothing at work, night shifts in a small shop are fun... Figure I can use that time to practice small things unable to bring my laptop but allowed to use my phone. I was looking at Kivy and Pydroid but not sure what's best.

Top answer
1 of 5
139
Everybody told you that " to improve your python skill you need to practice" but you do not always have your laptop with you. Hold on, here is something that can be done. The purpose of this small tutorial is to give you the ability to install and run python and git on your Android device. Disclaimer : I have no affiliation with any applications I will present. Introduction First thing first, you do not need to root your phone in order to follow this tuto. All application are free, of cource. Applications we will use are : pydroid 3 a pretty good application. It's free, prenium version give you access to autocompletion and some intelisense, it's not the same level as pycharm but is pretty usefull. Termux your Linux shell on your mobile, with this you will have access to git. git, the most famous version control system for all your project Installation From the play store install : pydroid3 Termux From Termux Ok, now you have it, open Termux and run the following command. apt-get update apt-get upgrade Then we can install git. apt-get install git Setup It's time to be organize and hack a little bit pydroid3. First create a folder where all your application will site. Mine is called programming and I add it under /storage/emulated/0. This path is the same as your document and download folders. When it's done, copy the path in your clipboard and open pydroid3. On the right, click on folder icon and then open. Follow this path Home, accomp_files, iiec_run and finally open iiec_run.py. (Home/accomp_files/iiec_run/iiec_run.py) Now, right under import sys add the following. PATH ="/storage/emulated/0/programming/" #the path of your programming folder # A tuple with all your package folders in it, at start you will have nothing, but with time it may look like mine APPs = ( "kbase", "RemoveMedia", "pyAnalysis", "BioPlate", "appPharma", "pytexu", "Tools", "Dilution", "BioPlateWeb", "pythontex-command") # Finally we append all path to system for app in APPs: sys.path.append(PATH + app) This little hack will alow you to import your package, those you created, not those that you will install using built in pip. Your first start Take your favorite web hosting service, create a package in it. Copy the link to clone it. Then go on your device and open Termux. run the command cd /emulated/storage/0/programming/, your are now in your programming folder. Clone your repo with the following git clone https://web-hosting.com/myRepo (replace the link with the one you copied). When it's done, open your pydroid3 app, and open your cloned repo. Don't forget to add your package in the iiec_run.py. Happy coding Fun fact I written 90 % of my package BioPlate using this setup. When you have, like me, more than one hour and half of common transportation a setup like this is really cool.
2 of 5
9
I use PyDroid3 a lot on my phone (with a bluetooth keyboard, and sometimes projection / hdmi connection to a decent tv/monitor) and it is excellent with many packages available. In fact, I often do coding on it in the chrome browser using Jupyter Notebook (which is one of the quick install options). I also sometimes use termux (a linux sandbox) and run iPython there
๐ŸŒ
Reddit
reddit.com โ€บ r/python โ€บ python ide on android - code locally and run the program over a hosted runtime or offline. opinions?
r/Python on Reddit: Python IDE on Android - code locally and run the program over a hosted runtime or offline. Opinions?
March 7, 2025 -

I thought of just coding a small fun project while I travel, but I cannot carry my personal laptop at all times, so I was searching for an IDE that would allow me to code quickly using features similar to intellisense. The code can be run locally or on a hosted python runtime while the app uploads the code and runs and returns the result of errors (security considerations aside).

I know this won't be as good as using a real IDE on a laptop/PC, but would it be good? I'd love to hear your opinions.

Edit : Main aim is to have an easy to Use IDE in Android

Find elsewhere
๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ best way to run python scripts on android?
r/learnpython on Reddit: Best way to run python scripts on Android?
June 7, 2021 -

Hey all, I've got a small discord bot that I would like to keep running in the background on my phone, as I know my phone is always on, unlike my laptop. I've tried running it on pydroid in the background, but the app eventually stops. Is there a better solution out there? Thanks in advance

๐ŸŒ
Reddit
reddit.com โ€บ r/androiddev โ€บ can i run python in an android app?
r/androiddev on Reddit: Can I run python in an Android app?
June 15, 2021 -

I am new to Java (and to be honest programming as a whole) and I am trying to do a very basic IOT project. I have a super simple (like 10 line) python code that I am using to pull Data from a MQTT broker (Adafruit IO) and wanted to know if it was possible to run this code in an Android application, and if so, how difficult would it be?

๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ best way to write code and run python scripts on android phones?
r/learnpython on Reddit: Best way to write code and run python scripts on Android phones?
August 3, 2017 -

I spend a lot of time on the train that I could be using to practice and test coding. The only device that's practical to me is my mobile android phone.

What's the best set of apps or sites I could use to write my python scripts and test running them through android devices?

๐ŸŒ
Reddit
reddit.com โ€บ r/python โ€บ is there a way to run python scripts on android?
r/Python on Reddit: Is there a way to run Python Scripts on Android?
November 27, 2018 -

I have a few Python quizzing scripts that help me memorize the times tables, squares, square roots, cubes etc.

Is there an Android application that can run Python scripts? I do these "exercises" everyday, so I want to do them on the ago or while I'm just idling around the house without having to reach for my laptop. I tried a few applications (like QPython) but they only allow you to script Python code.

๐ŸŒ
Reddit
reddit.com โ€บ r/androiddev โ€บ creating android app from python code
r/androiddev on Reddit: Creating android app from Python Code
December 27, 2022 -

Long story short, I want to pay a third party to develop an android app. I'm not a developer, but I have a background in scientific programming as an Engineer. I have some python code that performs a bunch of math operations in just a few lines (thanks to the scipy library). Is it unreasonable to expect a developer to be able to transform this python to JAVA (or whatever the language for android app dev is)? Is that a request that anyone has ever received in developing an app?

๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ running a python script 24/7 on a mobile
r/learnpython on Reddit: Running a python script 24/7 on a mobile
March 5, 2023 -

I have written a bot script in python that runs on my PC. Thats fine (although i do have an issue where when the script is running the keyboard goes a big 'laggy' esp in gaming) but what i want to do is run that same script on my android phone.

Now i have modified the script to use libs available for android. The script executes few things in s while loop (infinite loop).

I have found something called PyDroid but I have found that when the Pydroid app is minimized to the background the script stops working. The script needs to keep running even when in the backgrounds and even when phone is locked.

Thanks in advance