<span id="Label3"></p><p><p>Running a python script on android, or using the Python interface on android, is an attractive thing for a research or developer familiar with Python because the Python script is very efficient and there are many very good libraries</p></p><p><p>Android does not currently support running Python on Android devices, but there are some project groups on the web that do this: http://geeknizer.com/ Install-run-python-apps-scripts-on-android/this link to provide several projects, I slightly tried Kivy this way, need to install</p></p><p><p>Too many things to give up. Recommended HTTP://DINOSTEST.COM/NODE/28 This way, using the Qpython project, you can get a Python environment that can run on Android with very little Effort.</p></p><p><p></p></p><p>1. Download Qpython from Url:http://qpython.com/here I use a different way, directly from 360 mobile phone assistant search and install qpython, more convenient<br>2. adb install Qpython package to device or emulator<br>3. Change/system folder to be readable and writeable<br>4. MODIFY/SYSTEM/ETC/MKSHRC to add following at the end of the file<br>Android_private=/data/data/com.hipipal.qpyplus/files;export android_private<br>Android_public=/storage/sdcard/com.hipipal.qpyplus;export Android_public<br>Android_socket_zygote=9;export Android_socket_zygote<br>Ap_handshake=10e4c98a-4216-47a3-bf67-57b99d7d516e;export Ap_handshake<br>Ap_host=127.0.0.1;export Ap_host<br>Ap_port=45367;export Ap_port<br>ld_library_path=/vendor/lib:/system/lib:/data/data/com.hipipal.qpyplus/files/lib:/data/data/ Com.hipipal.qpyplus/files:/data/data/com.hipipal.qpyplus/lib<br>Export Ld_library_path<br>Path=/data/data/com.hipipal.qpyplus/files/bin:/sbin:/vendor/bin:/system/bin:/system/xbin<br>Export PATH<br>Pythonhome=/data/data/com.hipipal.qpyplus/files;export Pythonhome<br>Pythonoptimize=2;export pythonoptimize<br>pythonpath=/data/data/com.hipipal.qpyplus/files/lib/python2.7/:/data/data/com.hipipal.qpyplus/files/lib/ python2.7/lib-dynload/:/data/data/com.hipipal.qpyplus/files/lib/python2.7/site-packages/:/storage/sdcard/ Com.hipipal.qpyplus/lib/python2.7/site-packages/:<br>Export PYTHONPATH<br>pythonstartup=/storage/sdcard/com.hipipal.qpyplus/lib/python2.7/site-packages/qpythoninit.py<br>Export Pythonstartup<br>Tmpdir=/storage/sdcard/com.hipipal.qpyplus/cache;export TMPDIR</p><p><p>5 Relogin The Shell<br>6. Type python in the ADB shell<br><span class="__cf_email__" data-cfemail="10627f7f645077757e75627973">[email protected]</span>:/# python//i try to run Python directly (actually Running/data/data/com.hipipal.qpyplus/files/bin/python) will error : Error:only position independent executables (PIE) is Supported. I tested the device is Nexus 6, android 6.0, in</p></p><p><p>These newer Android systems are protected and require an executable program to compile with-pie, otherwise it will not Work. But I found the same directory under PYTHON-ANDROID5 can be run, so on the MV Python python.bak; Ln-s PYTHON-ANDROID5 python; This allows you to run Python directly later.</p></p><p><p></p></p><p><p></p></p><p><p>How to run Python on Android</p></p></span>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service