2

I have an application in python and I want to run it on android. the applications has several libraries how can I do it? thanks for your help

Andres Sosa
  • 23
  • 1
  • 1
  • 4

1 Answers1

1

Download QPython from the play store (https://play.google.com/store/apps/details?id=org.qpython.qpy&hl=en_US&referrer=utm_source%3Dgoogle%26utm_medium%3Dorganic%26utm_term%3Dqpython&pcampaignid=APPU_1_jDUOW4mtCMHdjwSz8aHQAQ) and the python 3.6 updater for it (https://play.google.com/store/apps/details?id=org.qpython.qpy36&hl=en_US&referrer=utm_source%3Dgoogle%26utm_medium%3Dorganic%26utm_term%3Dqpython&pcampaignid=APPU_1_9zUOW9yAFqr4jwSW-o24Bw). Then do the following steps:

  1. Open QPython

  2. Close QPython immediately after you open it

  3. Open QPython 3.6 updater

  4. Click "release python 3 resources"

  5. After it is done installing python 3 go back into QPython

  6. Click on the "more" button, this brings you to the settings menu

  7. In the settings switch to python 3 by checking "switch to python 3" (the default is python 2), and you can optionally allow root access if you have rooted the device by checking "root mode"

After setting things up you can use pip to install packages if you want by going to the main menu and clicking on "QPyPi" then clicking on the big "install with pythons pypi" button at the top of the menu.

Some things to note is that some packages wont work or won't work properly (some users have complained about inability to use OpenCV for example). Also I haven't been able to find a way to launch scripts from console and I haven't figured out how to get subprocess.Popen or os.sysyem to work right yet so using things like sys.argv is super annoying, you will probably need to find alternative means to get user argument input if your script needs it