Closed inclement closed 2 years ago
Oh, yes, it was working for both versions of python...mmmm..
I will pull the changes and I will test it again...
@inclement, the flask testapp with python3 it's working for me (compilation and runs fine on device), with the latests p4a master (I always clean the p4a build folder before doing the build) I will make a python2 build...
Thanks @opacam, I'll investigate my environment more before worrying too much about it.
Ok, python2 also working (without the last commit in master branch...I was doing the build when the merge happened)
I've tried compiling with both python2 and python3 in the Docker container, but I get compilation errors. See log:
(venv) user@5bbd34e1299b:~/testapps$ python setup_testapp_python2.py apk --sdk-dir $ANDROID_SDK_HOME --ndk-dir $ANDROID_NDK_HOME --bootstrap sdl2 --requirements python3,flask,pyjnius --debug [56/1788]
packages are []
running apk
WARNING: You did not supply an Android package identifier, trying org.test.testapp_python2 instead.
This may fail if this is not a valid identifier
Including testapp/main.py
Including testapp/colours.png
[WARNING]: --ndk-version is deprecated and no longer necessary, the value you passed is ignored
[INFO]: Will compile for the following archs: armeabi-v7a
[INFO]: Getting Android API version from user argument: 27
[INFO]: Available Android APIs are (19, 27)
[INFO]: Requested API target 27 is available, continuing.
[INFO]: Getting NDK dir from from user argument
[INFO]: Found NDK revision 17.2.4988734
[INFO]: Getting NDK API version (i.e. minimum supported API) from user argument
[INFO]: Found virtualenv at /usr/bin/virtualenv
[INFO]: Found the following toolchain versions: ['4.9']
[INFO]: Picking the latest gcc toolchain, here 4.9
[INFO]: No existing dists meet the given requirements!
[INFO]: No dist exists that meets your requirements, so one will be built.
[INFO]: Found a single valid recipe set: ['hostpython3', 'python3', 'genericndkbuild', 'setuptools', 'six', 'flask', 'pyjnius']
[INFO]: The selected bootstrap is sdl2
[INFO]: # Creating dist with sdl2 bootstrap
[INFO]: Dist will have name bdisttest_python2 and recipes (python3, flask, pyjnius)
[INFO]: Dist will also contain modules (markupsafe, click, werkzeug, itsdangerous, jinja2) installed from pip
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2
[INFO]: <- directory context /home/user/testapps
[INFO]: Recipe build order is ['hostpython3', 'python3', 'genericndkbuild', 'setuptools', 'six', 'flask', 'pyjnius']
[INFO]: The requirements (click, itsdangerous, jinja2, markupsafe, werkzeug) were not found as recipes, they will be installed with pip.
[INFO]: # Downloading recipes
[INFO]: Downloading hostpython3
[DEBUG]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/hostpython3
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/hostpython3
[DEBUG]: -> running basename https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
[DEBUG]: Python-3.7.1.tgz
[INFO]: hostpython3 download already cached, skipping
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading python3
[DEBUG]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/python3
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/python3
[DEBUG]: -> running basename https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
[DEBUG]: Python-3.7.1.tgz
[INFO]: python3 download already cached, skipping
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading genericndkbuild
[INFO]: Skipping genericndkbuild download as no URL is set
[INFO]: Downloading setuptools
[DEBUG]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/setuptools
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/setuptools
[DEBUG]: -> running basename https://pypi.python.org/packages/source/s/setuptools/setuptools-40.0.0.zip
[DEBUG]: setuptools-40.0.0.zip
[INFO]: setuptools download already cached, skipping
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading six
[DEBUG]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/six
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/six
[DEBUG]: -> running basename https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz
[DEBUG]: six-1.9.0.tar.gz
[INFO]: six download already cached, skipping
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading flask
[DEBUG]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/flask
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/flask
[DEBUG]: -> running basename https://github.com/pallets/flask/archive/0.10.1.zip
[DEBUG]: 0.10.1.zip
[INFO]: flask download already cached, skipping
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading pyjnius
[DEBUG]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/pyjnius
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/pyjnius
[DEBUG]: -> running basename https://github.com/kivy/pyjnius/archive/1.1.3.zip
[DEBUG]: 1.1.3.zip
[INFO]: pyjnius download already cached, skipping
[INFO]: <- directory context /home/user/testapps
[INFO]: # Building all recipes for arch armeabi-v7a
[INFO]: # Unpacking recipes
[INFO]: Unpacking hostpython3 for armeabi-v7a
[DEBUG]: -> running basename https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
[DEBUG]: Python-3.7.1.tgz
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop
[INFO]: hostpython3 is already unpacked, skipping
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking python3 for armeabi-v7a
[DEBUG]: -> running basename https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
[DEBUG]: Python-3.7.1.tgz
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/python3/armeabi-v7a__ndk_target_21
[INFO]: python3 is already unpacked, skipping
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking genericndkbuild for armeabi-v7a
[INFO]: Skipping genericndkbuild unpack as no URL is set
[INFO]: Unpacking setuptools for armeabi-v7a
[DEBUG]: -> running basename https://pypi.python.org/packages/source/s/setuptools/setuptools-40.0.0.zip
[DEBUG]: setuptools-40.0.0.zip
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21
[INFO]: setuptools is already unpacked, skipping
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking six for armeabi-v7a
[DEBUG]: -> running basename https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz
[DEBUG]: six-1.9.0.tar.gz
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/six-python3/armeabi-v7a__ndk_target_21
[INFO]: six is already unpacked, skipping
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking flask for armeabi-v7a
[DEBUG]: -> running basename https://github.com/pallets/flask/archive/0.10.1.zip
[DEBUG]: 0.10.1.zip
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/flask-python3-python3/armeabi-v7a__ndk_target_21
[INFO]: flask is already unpacked, skipping
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking pyjnius for armeabi-v7a
[DEBUG]: -> running basename https://github.com/kivy/pyjnius/archive/1.1.3.zip
[DEBUG]: 1.1.3.zip
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/pyjnius-genericndkbuild-python3/armeabi-v7a__ndk_target_21
[INFO]: pyjnius is already unpacked, skipping
[INFO]: <- directory context /home/user/testapps
[INFO]: # Prebuilding recipes
[INFO]: Prebuilding hostpython3 for armeabi-v7a
[INFO]: hostpython3 has no prebuild_armeabi_v7a, skipping
[INFO]: Prebuilding python3 for armeabi-v7a
[INFO]: python3 has no prebuild_armeabi_v7a, skipping
[INFO]: Applying patches for python3[armeabi-v7a]
[INFO]: python3 already patched, skipping
[INFO]: Prebuilding genericndkbuild for armeabi-v7a
[INFO]: genericndkbuild has no prebuild_armeabi_v7a, skipping
[INFO]: Prebuilding setuptools for armeabi-v7a
[INFO]: setuptools has no prebuild_armeabi_v7a, skipping
[INFO]: Prebuilding six for armeabi-v7a
[INFO]: six has no prebuild_armeabi_v7a, skipping
[INFO]: Prebuilding flask for armeabi-v7a
[INFO]: flask has no prebuild_armeabi_v7a, skipping
[INFO]: Prebuilding pyjnius for armeabi-v7a
[INFO]: pyjnius has no prebuild_armeabi_v7a, skipping
[INFO]: Applying patches for pyjnius[armeabi-v7a]
[INFO]: pyjnius already patched, skipping
[INFO]: # Building recipes
[INFO]: Building hostpython3 for armeabi-v7a
[INFO]: Skipping hostpython3 (3.7.1) build, as it has already been completed
[INFO]: Building python3 for armeabi-v7a
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/android-build
[WARNING]: Doing some hacky stuff to link properly
[DEBUG]: -> running cp /opt/android/android-ndk-r17c/platforms/android-21/arch-arm/usr/lib/crtbegin_so.o ./
[DEBUG]: -> running cp /opt/android/android-ndk-r17c/platforms/android-21/arch-arm/usr/lib/crtend_so.o ./
[INFO]: <- directory context /home/user/testapps
[INFO]: Building genericndkbuild for armeabi-v7a
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/jni
[DEBUG]: -> running ndk-build V=1
[DEBUG]: Android NDK: WARNING:/home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/jni/application/src/Android.mk:main: non-system libraries in linker flags: -lpython3.7m
[DEBUG]: Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
[DEBUG]: Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
[DEBUG]: Android NDK: current module
[DEBUG]: /opt/android/android-ndk-r17c/build/core/build-binary.mk:688: Android NDK: Module main depends on undefined modules: SDL2 python_shared
[DEBUG]: rm -f /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/arm64-v8a/* /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/armeabi-v7a/* /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86/* /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86_64/*
[DEBUG]: rm -f /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/arm64-v8a/gdbserver /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/armeabi-v7a/gdbserver /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86/gdbserver /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86_64/gdbserver
[DEBUG]: rm -f /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/arm64-v8a/gdb.setup /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/armeabi-v7a/gdb.setup /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86/gdb.setup /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86_64/gdb.setup
[DEBUG]: make: *** No rule to make target `/home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/jni/application/src/../../SDL/src/main/android/SDL_android_main.c', needed by `/home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/obj/local/armeabi-v7a/objs/main/__/__/SDL/src/main/android/SDL_android_main.o'. Stop.
Exception in thread background thread for pid 18545:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/user/venv/lib/python3.6/site-packages/sh.py", line 1540, in wrap
fn(*args, **kwargs)
File "/home/user/venv/lib/python3.6/site-packages/sh.py", line 2459, in background_thread
handle_exit_code(exit_code)
File "/home/user/venv/lib/python3.6/site-packages/sh.py", line 2157, in fn
return self.command.handle_command_exit_code(exit_code)
File "/home/user/venv/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_2:
RAN: /opt/android/android-ndk-r17c/ndk-build V=1
STDOUT:
Android NDK: WARNING:/home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/jni/application/src/Android.mk:main: non-system libraries in linker flags: -lpython3.7m
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
/opt/android/android-ndk-r17c/build/core/build-binary.mk:688: Android NDK: Module main depends on undefined modules: SDL2 python_shared
rm -f /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/arm64-v8a/* /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/armeabi-v7a/* /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86/* /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86_64/*
rm -f /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/arm64-v8a/gdbserver /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/armeabi-v7a/gdbserver /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86/gdbserver /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86_64/gdbserver
rm -f /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/arm64-v8a/gdb.setup /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/armeabi-v7a/gdb.setup /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86/gdb.setup /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86_64/gdb.setup
make: *** No rule to make target `/home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/jni/application/src/../../SDL/src/main/android/SDL_android_main.c', needed by `/home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/obj/local/armeabi-v7a/objs/main/__/__/SDL/src/main/android/SDL_android_main.o'. Stop.
STDERR:
Traceback (most recent call last):
File "setup_testapp_python2.py", line 31, in <module>
package_data={'testapp': ['*.py', '*.png']}
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/user/pythonforandroid/bdistapk.py", line 80, in run
main()
File "/home/user/pythonforandroid/toolchain.py", line 1051, in main
ToolchainCL()
File "/home/user/pythonforandroid/toolchain.py", line 560, in __init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/home/user/pythonforandroid/toolchain.py", line 151, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/home/user/pythonforandroid/toolchain.py", line 192, in build_dist_from_args
build_recipes(build_order, python_modules, ctx)
File "/home/user/pythonforandroid/build.py", line 566, in build_recipes
recipe.build_arch(arch)
File "/home/user/pythonforandroid/recipes/genericndkbuild/__init__.py", line 26, in build_arch
shprint(sh.ndk_build, "V=1", _env=env)
File "/home/user/pythonforandroid/logger.py", line 178, in shprint
for line in output:
File "/home/user/venv/lib/python3.6/site-packages/sh.py", line 863, in next
self.wait()
File "/home/user/venv/lib/python3.6/site-packages/sh.py", line 792, in wait
self.handle_command_exit_code(exit_code)
File "/home/user/venv/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_2:
RAN: /opt/android/android-ndk-r17c/ndk-build V=1
STDOUT:
Android NDK: WARNING:/home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/jni/application/src/Android.mk:main: non-system libraries in linker flags: -lpython3.7m
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
/opt/android/android-ndk-r17c/build/core/build-binary.mk:688: Android NDK: Module main depends on undefined modules: SDL2 python_shared
rm -f /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/arm64-v8a/* /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/armeabi-v7a/* /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86/* /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86_64/*
rm -f /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/arm64-v8a/gdbserver /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/armeabi-v7a/gdbserver /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86/gdbserver /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86_64/gdbserver
rm -f /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/arm64-v8a/gdb.setup /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/armeabi-v7a/gdb.setup /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86/gdb.setup /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/libs/x86_64/gdb.setup
make: *** No rule to make target `/home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/jni/application/src/../../SDL/src/main/android/SDL_android_main.c', needed by `/home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2/obj/local/armeabi-v7a/objs/main/__/__/SDL/src/main/android/SDL_android_main.o'. Stop.
STDERR:
(venv) user@5bbd34e1299b:~/testapps$
Edit: Ouch my bad, I've explicitly specified the wrong bootstrap :confused:
OK so I have it working with python3. It was compiled from Docker with:
python setup_testapp_flask.py apk --sdk-dir $ANDROID_SDK_HOME --ndk-dir $ANDROID_NDK_HOME --requirements python3,flask,pyjnius
logcat:
02-01 14:13:42.608 17693 17795 I python : Android kivy bootstrap done. __name__ is __main__
02-01 14:13:42.608 17693 17795 I python : AND: Ran string
02-01 14:13:42.608 17693 17795 I python : Run user program, change dir and execute entrypoint
02-01 14:13:42.608 17693 17795 I python : main.py was successfully called
02-01 14:13:42.608 17693 17795 I python : this is the new main.py
02-01 14:13:42.608 17693 17795 I python : python version is: 3.7.1 (default, Feb 1 2019, 12:34:00)
02-01 14:13:42.608 17693 17795 I python : [Clang 6.0.2 (https://android.googlesource.com/toolchain/clang 183abd29fc496f55
02-01 14:13:42.608 17693 17795 I python : python path is ['.', '/data/user/0/org.test.testapp_flask/files/app/_python_bundle/stdlib.zip', '/data/user/0/org.test.testapp_flask/files/app/_python_bundle/modules', '/data/user/0/org.test.testapp_flask/files/app/_python_bundle/site-packages']
02-01 14:13:42.608 17693 17795 I python : imported os
02-01 14:13:42.829 1230 1278 I ActivityManager: Displayed org.test.testapp_flask/org.kivy.android.PythonActivity: +2s19ms
02-01 14:13:43.368 17693 17795 I python : flask1???
02-01 14:13:43.368 17693 17795 I python : contents of this dir ['p4a_env_vars.txt', 'main.pyc', 'static', 'templates', '_python_bundle', '_loading_style.css', '_load.html', '.nomedia', 'private.version']
02-01 14:13:43.368 17693 17795 I python : flask???
02-01 14:13:43.370 17693 17795 I python : imported flask etc
02-01 14:13:43.370 17693 17795 I python : importing pyjnius
02-01 14:13:43.907 17693 17795 I python : curdir /data/data/org.test.testapp_flask/files/app
02-01 14:13:43.943 17693 17795 I python : * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
02-01 14:13:44.071 17693 17693 I PythonActivity: Opening URL: http://127.0.0.1:5000/
02-01 14:13:44.192 17693 17795 I python : 127.0.0.1 - - [01/Feb/2019 14:13:44] "GET / HTTP/1.1" 200 -
02-01 14:13:44.292 17693 17795 I python : 127.0.0.1 - - [01/Feb/2019 14:13:44] "GET /static/style.css HTTP/1.1" 404 -
02-01 14:13:44.305 17693 17795 I python : 127.0.0.1 - - [01/Feb/2019 14:13:44] "GET /static/colours.png HTTP/1.1" 200 -
02-01 14:13:44.341 17693 17795 I python : 127.0.0.1 - - [01/Feb/2019 14:13:44] "GET /favicon.ico HTTP/1.1" 404 -
02-01 14:14:00.214 17693 17795 I python : 127.0.0.1 - - [01/Feb/2019 14:14:00] "GET /page2? HTTP/1.1" 200 -
02-01 14:14:00.239 17693 17795 I python : 127.0.0.1 - - [01/Feb/2019 14:14:00] "GET /static/style.css HTTP/1.1" 404 -
02-01 14:14:00.246 17693 17795 I python : 127.0.0.1 - - [01/Feb/2019 14:14:00] "GET /static/coloursinv.png HTTP/1.1" 200 -
02-01 14:14:01.430 17693 17795 I python : 127.0.0.1 - - [01/Feb/2019 14:14:01] "GET /? HTTP/1.1" 200 -
02-01 14:14:01.466 17693 17795 I python : 127.0.0.1 - - [01/Feb/2019 14:14:01] "GET /static/style.css HTTP/1.1" 404 -
Closing as now the flask test app works fine onpython3
(python2
has been removed)
Just tried the flask testapp with python2 and python3. Python 2 fails loading libpython2.7.so in werkzeug, while Python 3 fails at Py_Initialize in start.c.
Python 2:
Python 3:
@opacam Are these expected to be working? For Python 2 it seems it may not know where to load libpython2.7.so from, which would be okay, but why is Python 3 failing at Py_Initialize even though everything seems to be set up properly?