python-for-android icon indicating copy to clipboard operation
python-for-android copied to clipboard

not be able to set PYTHONHOME in python3 binary.

Open kuri65536 opened this issue 9 years ago • 2 comments

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

kuri65536 avatar Mar 31 '15 17:03 kuri65536

This error still remains in Python 3.6.2. Root cause is same as https://github.com/rave-engine/python3-android/issues/7

kuri65536 avatar Sep 30 '17 10:09 kuri65536

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.

kuri65536 avatar Sep 30 '17 10:09 kuri65536