-1

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?

2 Answers 2

1

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

0

I assume you are on Android so why you don't just download the app already optimized? There's and a fine editor too. When you install it from GooglePlay you just tap on console and you are ready.

1
  • Yeah. In fact that's the way I installed python. But where's the fun in there? :P Nov 13, 2015 at 5:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .