DEV Community

How I ran Django on my android phone ❌💻

ColeDrain on September 02, 2020

How I ran Django on my android phone... Yeah, it seems weird coding with your phone, but right now I don't have an option, so if you are...
Collapse
 
robert197 profile image
Robert

When i started my studies back in 2013 they told me: "Java is so great and popular because it is running on every machine." And we started to learn java. 😂
Now i see people running Django server on a phone in few simple steps.

Django Unchained

Collapse
 
coledrain profile image
ColeDrain

😁😁😅

Collapse
 
chuckis profile image
Ruslan Ishchuk • Edited

after trying to install virtualenv I got this:

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

Collapse
 
coledrain profile image
ColeDrain

Try running this command:

pkg upgrade

Collapse
 
chuckis profile image
Ruslan Ishchuk

suspecting: my phone must be rooted?

Thread Thread
 
coledrain profile image
ColeDrain

no it isn't compulsory.

Thread Thread
 
chuckis profile image
Ruslan Ishchuk • Edited

after trying to create
virtual environment I got a 'permission error'
dev-to-uploads.s3.amazonaws.com/i/...

Thread Thread
 
coledrain profile image
ColeDrain • Edited

I guess you have ran this command before:

termux-setup-storage

run it again then try creating the virtualenv, sorry for the issues so far. 😬

Collapse
 
codeperfectplus profile image
Deepak Raj

It's hard to manage files and code on the phone. Not recommended.

Collapse
 
coledrain profile image
ColeDrain

ikr, just if you have no option. It's not that bad tho. Some can't afford a laptop, so you can do with what you have.

Collapse
 
pomfrit123 profile image
***

A laptop from the previous century is better than a phone :D

Thread Thread
 
coledrain profile image
ColeDrain

😁😁

Collapse
 
tombohub profile image
tombohub

I found my self many times waiting for something somewhere and then wished I can work on my project while waiting. Can we use git too?

Thread Thread
 
coledrain profile image
ColeDrain

yeah.. Sure

Collapse
 
ranjandel profile image
ranjan-del

.../django1/mysite $ virtualenv venv
PermissionError: [Errno 1] Operation not permitted: '/data/data/com.termux/files/usr/bin/python3' -> '/storage/emulated/0/django1/mysite/venv/bin/python'

Any one help

Collapse
 
pratham82 profile image
Prathamesh Mali

Just tried it 😂 my friends loosing their mind.

Collapse
 
coledrain profile image
ColeDrain

😆
Ha, it's very cool.

Collapse
 
faraixyz profile image
Farai Gandiya

That’s cool. I think it might work on iOS too with Pythonista.

Collapse
 
coledrain profile image
ColeDrain • Edited

That's cool, thought IOS was kinda strict.

Collapse
 
faraixyz profile image
Farai Gandiya

They’ve loosened up a bit with interpreted languages though this app was around way before then. Dependency management with it is still annoying and I’m not sure what the developer is working on now. There’s another app called play.js which does a good job with JavaScript.

Thread Thread
 
coledrain profile image
ColeDrain

Wow, that's really interesting to know.

Collapse
 
apoorvashukla profile image
Apoorva Kumar Shukla

Collapse
 
saltaformajo profile image
Saltaformajo

Interesting what else we can do with termux 🤔. It has api to use some native phone features, like get location, send notifications and more. But I don't know really where it will be useful

Collapse
 
coledrain profile image
ColeDrain

From their wiki.
There are a number of common use-cases for the Termux application:

Data processing with Python.
Programming in a development environment.
Downloading and managing files and pages using time-established tools.
Learning the basics of the Linux command line environment.
Running an SSH client.
Synchronizing and backing up your files.
Of course, usage is not limited to the topics listed above. There are more than 1000 packages in our repositories. If these packages don't have what you're looking for, you can compile your own - we have a variety of build tools, including compilers for languages like C, C++, Go, Rust. Interpreters for common languages like NodeJS, Python, Ruby are available too.

Collapse
 
saltaformajo profile image
Saltaformajo

for data processing, it would be more suitable to buy a minimal VPS or even free. For example google cloud (free) is enough to run vs code in browser mode, and much more. I suspect that bash with android integration is more interesting related with the features of the device. For everything else you can connect to the server and achieve full opportunities

Collapse
 
apoorvashukla profile image
Apoorva Kumar Shukla

hi

Collapse
 
apoorvashukla profile image
Apoorva Kumar Shukla
Collapse
 
apoorvashukla profile image
Apoorva Kumar Shukla
Collapse
 
apoorvashukla profile image
Apoorva Kumar Shukla

Hello

Collapse
 
darwinfont profile image
darwinfont

Me gustaria saber si desde esta app seria posible instalar Node js

Collapse
 
gatsbysex profile image
Matz

$ virtualenv env
PermissionError: [Errno 1] Operation not permitted: '/data/data/com.termux/files/usr/bin/python3' -> '/storage/emulated/0/aamydjango/Django/env/bin/python'

Collapse
 
darwinfont profile image
darwinfont

Tengo una duda desde esta app tambien seria posible instalar node js