apk with sqlite3 python3 kivy No module named '_sqlite3'
See original GitHub issueRan into problems with making an APK, mostly due to incorrect software and api versions. The last of those (unable to find a valid dependency graph) was solved over in https://github.com/kivy/python-for-android/issues/1222
Now my APK compiles fine: and crashes on load. The problem is it can’t find the _sqlite3 module. The latest pythonforandroid has a recipe for sqlite3 which seems to compile just fine. It produces a libsqlite3.so file which is included in my APK (checked), but this doesn’t seem to be what python is looking for when the app loads on the device. I am able to run the rest of the app if I remove the import and use of the sqlite3 module, but it is critical to most of the functionality in the final version that sqlite3 work.
I have tried removing from blacklist.txt (wherever I could find one, there were several) any mention of sqlite3 files: no change. I have tried whitelisting sqlite3 files in buildozer.spec: no change. I have tried completely removing the .buildozer directory and allowing it all to re-downlooad/install/compile: no change. Love some help if anyone has ideas.
Edit: Just found in MyProject/.buildozer/android/platform/build/build/other_builds/python3/armeabi-v71__ndk_target_21/python3/android_build/config.log a mention of sqlite3 that looks like:
configure:10267: checking for --enable-loadable-sqlite-extensions
configure:10277: result: no
Does this mean sqlite is not being built into python3? Not sure how I would change this as buildozer is doing all the p4a stuff for me.
Edit 2: Further research tells me that option is not required to get sqlite3 working.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:10 (2 by maintainers)
Top GitHub Comments
Note: to use sqlite put “sqlite3” into
--requirements
and it needs to go before “python3” in your requirements list (otherwise the core module for it won’t be built)Closing as hopefully fixed by #1617, please feel free to reopen if it does still happen.