There's a very popular question on SO "How to run python on android" but nobody actually explains what you have to do or how it's done. Since I went through all of these projects for hours to figure it out I thought I'd share how you actually do it. From a high level, to run just python on android you must: Cross compile python and any extensions for the target ABIs (arm, arm-v7a, etc.. see https://developer.android.com/ndk/guides/abis.htm l) Include the cross compiled libpython and all CC'd extensions as native libraries (gradle's jniLibs https://developer.android.com/studio/projects/add-native-code.html#link-gradle ) or optionally extract them to the assets folder Include the Python standard library and any extra python files as android assets (compress in a zip and have the app extract to assets on first launch) Create a C or C++ native file using the NDK and have it initialize Python using the C-API ( https://docs.python.org/2/c-api/intro.h
Software projects, tips, and tutorials from codelv.com