I have downloaded Python 3 and a terminal emulator. But when I type python3 in the terminal, it says "not found".
How do I run the python interactive shell inside the terminal?
I have downloaded Python 3 and a terminal emulator. But when I type python3 in the terminal, it says "not found".
How do I run the python interactive shell inside the terminal?
You first have to set the environment settings in your device to access the python 3.
To use, make the script executable and run from the shell:
chmod a+x standalone_python.sh
./standalone_python.sh
or, if that doesn't work (and it may not, depending on filesystem) just:
sh /sdcard/standalone_python.sh
The script at time of writing looks like this:
#! /bin/sh
export EXTERNAL_STORAGE=/mnt/storage
PYTHONPATH=/mnt/storage/com.googlecode.pythonforandroid/extras/python
PYTHONPATH=${
PYTHONPATH
}
:/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6/lib-dynload
export PYTHONPATH
export TEMP=/mnt/storage/com.googlecode.pythonforandroid/extras/python/tmp
export PYTHON_EGG_CACHE=$TEMP
export PYTHONHOME=/data/data/com.googlecode.pythonforandroid/files/python
export LD_LIBRARY_PATH=/data/data/com.googlecode.pythonforandroid/files/python/lib
/data/data/com.googlecode.pythonforandroid/files/python/bin/python "$@"
Original Source :
https://code.google.com/p/python-for-android/wiki/RunPythonFromShell
Q & A