在android终端模拟器中执行python脚本 [英] Executing python script in android terminal emulator

查看:408
本文介绍了在android终端模拟器中执行python脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Android设备中安装了python 2.7,并尝试通过在终端仿真器中键入命令来执行python脚本.问题是,尽管我使用python的完整路径,但会出现以下错误:

I installed python 2.7 in my Android device and I tried executing a python script by typing the command in terminal emulator. The problem is that although I use the full path for python the following error appears:

link_image[1997]: failed to link ./python CANNOT LINK EXECUTABLE.

我试图在./~bashrc中添加环境变量,但没有成功.有什么主意吗?

I tried to add environment variables in ./~bashrc but I didn't make it. Any idea ?

推荐答案

好的,它已经解决了.我按照以下步骤操作( http://code.google.com/p/python-for-android/wiki/RunPythonFromShell ),但是首先我必须将文件standalone_python.sh放在/data/中,因为在sdcard中我没有执行权限.最后使用"su"使它以root用户身份运行脚本.

OK it is solved. I followed these steps (http://code.google.com/p/python-for-android/wiki/RunPythonFromShell) but first I had to put the file standalone_python.sh in /data/ because in sdcard I had no permission to execute. And finally using 'su' I made it to run my script as root.

这篇关于在android终端模拟器中执行python脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆