Kivy buildozer调试错误:没有名为kivy的模块

时间:2018-01-22 01:57:08

标签: android python kivy buildozer

我正在尝试使用buildozer和python2构建一个简单的kivy应用程序,但由于某种原因,在此构建内部没有模块'kivy'。来自buildozer的一些日志:

[INFO]:    STDOUT:
    Using distutils 
Environ change use_sdl2 -> True 

Cython check avoided.   
Traceback (most recent call last):  
  File "setup.py", line 353, in <module>    
    import kivy 
ImportError: No module named kivy
[INFO]:    STDERR:

[INFO]:    COMMAND:
cd /home/zeak/Desktop/.buildozer/android/platform/build/build/other_builds/kivy-python2-sdl2/armeabi-v7a/kivy && /home/zeak/Desktop/.buildozer/android/platform/build/build/python-installs/py2048/bin/python.host setup.py build_ext -v

[WARNING]: ERROR: /home/zeak/Desktop/.buildozer/android/platform/build/build/python-installs/py2048/bin/python.host failed!
# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=py2048 --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/zeak/Desktop/.buildozer/android/platform/build
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2

2 个答案:

答案 0 :(得分:0)

您的计算机上是否安装了kivy?您是否在buildozer.spec文件的要求中添加了基维? 如果否,则打开buildozer.spec文件,并在需求中添加所有需求

答案 1 :(得分:0)

检查是否安装了 kivy (pip install kivy)。并在 buildozer.spec 中添加“requirements=kivy”。