FlimsyBanana
FlimsyBanana

Reputation: 19

Kivy Buildozer Requirements Error with Python 3

I'm trying to create an app for android using buildozer that needs to use OpenCV and therefore python 3(Due to the fact that OpenCV is only compatible with python 3+). But, when I pass buildozer -v android_new debug or buildozer android_new release or buildozer android_new debug deploy run logcat, it returns the same error:

Command failed: python -m pythonforandroid.toolchain --color=always --storage-dir=/home/kivy/KivyApp/.buildozer/android/platform/build create --dist_name=myapp21 --bootstrap=sdl2 --requirements=kivy,opencv,python3 --arch armeabi-v7a --copy-libs

The directory mentioned in the error message (/home/kivy/KivyApp/.buildozer/android/platform/build) is empty, and I believe that the reason this doesn't work is that the python version on the buildozer virtual machine is Python 2.7.13, and when the requirements stated in the buildozer.spec file are kivy, opencv, and python3, it tries to pip install them resulting in an error for the last 2.

The Buildozer.spec file: https://docs.google.com/document/d/1UAHekPUatAOrdIU_zFRwoPWgQKd-d0L3QsRXOr2Lo4Q/edit?usp=sharing

So, in general, I wanted to fully understand the problem before trying to install a new version of python on the buildozer virtual machine. If my assumption is incorrect, please correct me and if possible, direct me to the correct answer.

Thanks!

Upvotes: 0

Views: 1516

Answers (1)

prosti
prosti

Reputation: 46449

It is not a wonder. Python3 and android and Kivy is still in experimental state. https://kivy.org/doc/stable/guide/packaging-android.html

enter image description here

Better to wait or to use Python2.7

Upvotes: 0

Related Questions