Kivy错误:[CRITICAL] [App]无法获取窗口,中止 [英] Kivy error: [CRITICAL] [App ] Unable to get a Window, abort

查看:606
本文介绍了Kivy错误:[CRITICAL] [App]无法获取窗口,中止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有针对此Kivy错误的解决方案均不适用于我.现在已经两周多了,但我所有的努力都徒劳无功.我正在使用python 3.6.4,kivy 1.10.1,pycharm作为我的IDE和Windows10.这是错误代码和代码本身:

All the solutions that am seeing for this Kivy error does not work for me. It has been more tha 2 weeks now yet all my efforts are in vain. Am using python 3.6.4, kivy 1.10.1, pycharm as my IDE and Windows 10. here is the error code and the code itself:

代码:

from kivy.core.window import Window
import os
os.environ['KIVY_GL_BACKEND'] = 'angel_sdl2'
from kivy.app import App
from kivy.uix.button import Button

# from kivy import Config
# Config.set('graphics', 'multisamples', '0')

class MyApp(App):
  def build(self):
     return Button(text='Hello world')


if __name__ == '__main__':
   MyApp().run()

错误:

enter code here"C:\Program Files\Python36-32\python.exe" 
"C:/Users/Sabinus O Ofoleta/Desktop/python/tested.py"
[INFO   ] [Logger      ] Record log in C:\Users\Sabinus O    Ofoleta\.kivy\logs\kivy_19-02-21_4.txt
[INFO   ] [Kivy        ] v1.10.1
 [INFO   ] [Python      ] v3.6.7 (v3.6.7:6ec5cf24b7, Oct      20 2018, 12:45:02) [MSC v.1900 32 bit (Intel)]
 [INFO   ] [Factory     ] 194 symbols loaded
 [INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
 [INFO   ] [Text        ] Provider: sdl2
 [INFO   ] [Window      ] Provider: sdl2
 [INFO   ] [Window      ] Activate GLES2/ANGLE context
 [CRITICAL] [Window      ] Unable to find any valuable  Window provider.
 sdl2 - RuntimeError: b'Could not initialize EGL'
 File "C:\Program Files\Python36-32\Lib\site-packages   \kivy\core\__init__.py", line 67, in core_select_lib
  cls = cls()
 File "C:\Program Files\Python36-32\Lib\site-packages \kivy\core\window\window_sdl2.py", line 140, in __init__
super(WindowSDL, self).__init__()
 File "C:\Program Files\Python36-32\Lib\site-packages\kivy\core\window\__init__.py", line 968, in __init__
self.create_window()
 File "C:\Program Files\Python36-32\Lib\site-packages\kivy\core\window\window_sdl2.py", line 272, in create_window
self.fullscreen,resizable , state)
 File "kivy\core\window\_window_sdl2.pyx", line 209, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window
 File "kivy\core\window\_window_sdl2.pyx", line 66, in kivy.core.window._window_sdl2._WindowSDL2Storage.die

 [CRITICAL] [App         ] Unable to get a Window, abort.

 Process finished with exit code 1

我的计算机使用的是opengl 1.1,因为其他版本不兼容,所以我决定使用'angel_sdl2'.谢谢

My computer is using opengl 1.1 because other versions are not compatible so I dicided to use 'angel_sdl2'. Thanks

推荐答案

我很难相信可以运行Windows 10的计算机不能运行超过20年的1.1以上的最新版本的opengl. ,OpenGL ES 2.0本身已有10多年的历史了.更有可能的是,您没有安装用于GPU的驱动程序.即使使用angle_sdl2,也需要使用DirectX 11,因为angle只是在其之上的OpenGL的一种实现.

I find it hard to believe that a computer that can run windows 10 can't run more recent versions of opengl than 1.1, which is more than 20 years old, OpenGL ES 2.0 itself being more than 10 years old. What's more likely, is that you don't have drivers for your GPU installed. Even to use angle_sdl2, you need to have DirectX 11 working, as angle is simply an implementation of OpenGL on top of it.

这篇关于Kivy错误:[CRITICAL] [App]无法获取窗口,中止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆