Using python and matplotlib on android

后端 未结 12 1255
时光说笑
时光说笑 2020-12-13 14:10

Is there a way to set up python 2.7.x + matplotlib on an android tablet so that you can run simple standard python code? I would like to be able to run the same scripts I ru

相关标签:
12条回答
  • 2020-12-13 14:21

    Pydroid is great for Matplotlib on Android, supports Numpy and many other libraries:

    Pydroid for Python 2.7

    Pydroid 3 for Python 3.6

    0 讨论(0)
  • 2020-12-13 14:21

    You could set up a cheap server (Raspberry Pi?) and create an ssh connection to it to access full python functionality through a vnc viewer android app or the shell

    0 讨论(0)
  • 2020-12-13 14:22

    Use the linux shell, I have it git python and pip installed on my phone. I used gnuroot in the play store.. You can apt-get install python pip from there

    0 讨论(0)
  • 2020-12-13 14:27

    Here is the code, this works after installing GNURoot Debian as you said. Just a detail : my graph is exported directly in a .png file :

    from pylab import *
    import matplotlib.pyplot as plt
    plt.switch_backend('agg')
    x = linspace(-5, 5, 100)
    y = sin(x)
    plot(x, y)
    out_png = 'out_file.png'
    plt.savefig(out_png, dpi=150)
    
    0 讨论(0)
  • 2020-12-13 14:29

    Is it easy, no.

    Can it be done? Yes. I believe a skilled Python / Android developer could do it in 2 to 8 hours of effort.. It's a rare and complex request.

    Why do I think it can be done? This sample: http://matplotlib.org/examples/pylab_examples/webapp_demo.html

    Using a different library, and not abstracted for data without live hardware, this sample shows me that SL4A can do web-based graphics: http://www.smartphonedaq.com/android-python-ecg.page

    Now, if you were talking native GUI graphics in Android - then I'm focused way too much on the web methods of publishing with SL4A ;)

    0 讨论(0)
  • 2020-12-13 14:31

    ever heard of qpython? http://qpython.com/ i personally never used it, but my colleague were quite handy with it so you may want to look at that

    0 讨论(0)
提交回复
热议问题