x11 - ImportError: No module named 'kivy.core.window.window_x11

别等时光非礼了梦想. 提交于 2020-01-15 07:13:20

问题


Currently I am trying to build an App that I wrote in Python and Kivy via buildozer. Whatever I am doing, I am running into problems with window_x11. Even if I comment all the windows related things out in the code or doing all the things described in this post.

Here is a part of the error generated:

x11 - ImportError: No module named 'kivy.core.window.window_x11'

Another strange aspect is that I am using Python-3.x, but it keeps on saying about python-2.7.

running cython ./kivy/core/window/window_x11.pyx
()                                                                             
           working:Exception in thread background thread for pid 20337:        
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 2170, in background_thread
    handle_exit_code(exit_code)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1929, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
ErrorReturnCode_1: 

  RAN: /usr/local/bin/cython ./kivy/core/window/window_x11.pyx

  STDOUT:

Error compiling Cython file:
------------------------------------------------------------
...
from kivy.config import Config
from kivy.base import stopTouchApp, EventLoop, ExceptionManager
from kivy.utils import platform
from os import environ

from window_info cimport WindowInfoX11
^

Currently I am lost in what to do and I also don't know where to start to solve the problem.


回答1:


This is a bug introduced in Kivy master, which is fixed in python-for-android's master branch. You can probably work around it by setting p4a.branch = master in the buildozer.spec, or using an older version of Kivy than the master branch (ideally Kivy 1.10).



来源:https://stackoverflow.com/questions/48477845/x11-importerror-no-module-named-kivy-core-window-window-x11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!