简体   繁体   中英

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!

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

在此处输入图片说明

Better to wait or to use Python2.7

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM