简体   繁体   English

Python 3的Kivy Buildozer要求错误

[英]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+). 我正在尝试使用buildozer为Android创建一个应用程序,该应用程序需要使用OpenCV,因此需要使用python 3(由于OpenCV仅与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: 但是,当我通过buildozer -v android_new debugbuildozer android_new releasebuildozer android_new debug deploy run logcat ,它返回相同的错误:

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. 错误消息中提到的目录( /home/kivy/KivyApp/.buildozer/android/platform/build )为空,我相信这不起作用的原因是buildozer虚拟机上的python版本是Python 2.7.13,并且当buildozer.spec文件中所述的要求是kivy,opencv和python3时,它会尝试点安装它们,导致最后2个错误。

The Buildozer.spec file: https://docs.google.com/document/d/1UAHekPUatAOrdIU_zFRwoPWgQKd-d0L3QsRXOr2Lo4Q/edit?usp=sharing Buildozer.spec文件: 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. 因此,总的来说,我想在尝试在buildozer虚拟机上安装新版本的python之前完全理解该问题。 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. Python3和android以及Kivy仍处于实验状态。 https://kivy.org/doc/stable/guide/packaging-android.html https://kivy.org/doc/stable/guide/packaging-android.html

在此处输入图片说明

Better to wait or to use Python2.7 最好等待或使用Python2.7

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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