python-for-android
python-for-android copied to clipboard
not be able to set PYTHONHOME in python3 binary.
PYTHONHOME environment cause segfault in python3 binary.
item | description |
---|---|
python | python3.4.3 |
binary | r18 |
android | 2.3.6 (API10) |
/data/data/com.googlecode.python3forandroid # export PYTHONHOME=`pwd`/files/python3
/data/data/com.googlecode.python3forandroid # sh /sdcard/download/standalone_python.sh
Fatal Python error: Py_Initialize: can't initialize sys
sys.excepthook is missing
object : ValueError('character U+7461642f is not in range [U+0000; U+10ffff]',)
type : ValueError
refcount: 1
address : 0x4003c630
lost sys.stderr
This error still remains in Python 3.6.2. Root cause is same as https://github.com/rave-engine/python3-android/issues/7
Current status,
Version | API | issue | Python |
---|---|---|---|
Android 4.4 | API 19 | x | 3.6.2 |
Android 6.0 | API 24 | o | 3.6.2 |
It seems that some API of bionic did not work with PySys_Init. Python3 need a patch to use with PYTHONHOME.