• <bdo id='eSIQk'></bdo><ul id='eSIQk'></ul>

    <small id='eSIQk'></small><noframes id='eSIQk'>

      <i id='eSIQk'><tr id='eSIQk'><dt id='eSIQk'><q id='eSIQk'><span id='eSIQk'><b id='eSIQk'><form id='eSIQk'><ins id='eSIQk'></ins><ul id='eSIQk'></ul><sub id='eSIQk'></sub></form><legend id='eSIQk'></legend><bdo id='eSIQk'><pre id='eSIQk'><center id='eSIQk'></center></pre></bdo></b><th id='eSIQk'></th></span></q></dt></tr></i><div id='eSIQk'><tfoot id='eSIQk'></tfoot><dl id='eSIQk'><fieldset id='eSIQk'></fieldset></dl></div>
      <tfoot id='eSIQk'></tfoot>
    1. <legend id='eSIQk'><style id='eSIQk'><dir id='eSIQk'><q id='eSIQk'></q></dir></style></legend>

        Kivy 错误:[CRITICAL] [App] 无法获取窗口,中止

        时间:2023-10-09
        <legend id='LJfsn'><style id='LJfsn'><dir id='LJfsn'><q id='LJfsn'></q></dir></style></legend>
        <i id='LJfsn'><tr id='LJfsn'><dt id='LJfsn'><q id='LJfsn'><span id='LJfsn'><b id='LJfsn'><form id='LJfsn'><ins id='LJfsn'></ins><ul id='LJfsn'></ul><sub id='LJfsn'></sub></form><legend id='LJfsn'></legend><bdo id='LJfsn'><pre id='LJfsn'><center id='LJfsn'></center></pre></bdo></b><th id='LJfsn'></th></span></q></dt></tr></i><div id='LJfsn'><tfoot id='LJfsn'></tfoot><dl id='LJfsn'><fieldset id='LJfsn'></fieldset></dl></div>

          • <bdo id='LJfsn'></bdo><ul id='LJfsn'></ul>
          • <small id='LJfsn'></small><noframes id='LJfsn'>

            1. <tfoot id='LJfsn'></tfoot>
                <tbody id='LJfsn'></tbody>

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

                  问题描述

                  我看到的针对此 Kivy 错误的所有解决方案均不适用于我.现在已经有两个多星期了,但我所有的努力都是徒劳的.我使用 python 3.6.4、kivy 1.10.1、pycharm 作为我的 IDE 和 Windows 10.这是错误代码和代码本身:

                  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 FilesPython36-32python.exe" 
                  "C:/Users/Sabinus O Ofoleta/Desktop/python/tested.py"
                  [INFO   ] [Logger      ] Record log in C:UsersSabinus O    Ofoleta.kivylogskivy_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 FilesPython36-32Libsite-packages   kivycore\__init__.py", line 67, in core_select_lib
                    cls = cls()
                   File "C:Program FilesPython36-32Libsite-packages kivycorewindowwindow_sdl2.py", line 140, in __init__
                  super(WindowSDL, self).__init__()
                   File "C:Program FilesPython36-32Libsite-packageskivycorewindow\__init__.py", line 968, in __init__
                  self.create_window()
                   File "C:Program FilesPython36-32Libsite-packageskivycorewindowwindow_sdl2.py", line 272, in create_window
                  self.fullscreen,resizable , state)
                   File "kivycorewindow\_window_sdl2.pyx", line 209, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window
                   File "kivycorewindow\_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

                  推荐答案

                  在 Intel GMA 965 和 Win10 的笔记本电脑上出现同样的问题

                  Same issue on a laptop with Intel GMA 965 and Win10

                  原因:显卡驱动过时,没有新版本.

                  The reason: graphics driver is outdated, no new versions.

                  解决方案(对我有用):

                  1) 通过 pal1000 https://github.com/pal1000/save 应用工具-legacy-intel-graphics

                  1) Apply tool by pal1000 https://github.com/pal1000/save-legacy-intel-graphics

                  (更多信息请访问 https://community.khronos.org/t/i-have-opengl-3-1-but-kivy-says-that-i-have-only-1-1/103980/6)

                  2) 安装依赖,比如

                  python -m pip install --ignore-installed kivy.deps.sdl2 kivy.deps.glew
                  

                  (并将系统变量KIVY_GL_BACKEND"设置为glew",或者不设置 - 这是默认值;顺便说一句,安装 kivy.deps.angle 并设置angle_sdl2"没有帮助我在这种情况下)

                  (and set system variable "KIVY_GL_BACKEND" to "glew", or don't set - this is default value; btw installing kivy.deps.angle and setting "angle_sdl2" don't help me in this case)

                  3) 在python代码前添加:

                  3) Add this before python code:

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

                  (来自 Kivy 未检测到 OpenGL 2.0)

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

                  上一篇:正确使用 Kivy 的 .kv 文件并将它们导入 Python 脚本 下一篇:如何将多列放入 kivy RecycleView?

                  相关文章

                  最新文章

                2. <small id='Jr3UF'></small><noframes id='Jr3UF'>

                  <i id='Jr3UF'><tr id='Jr3UF'><dt id='Jr3UF'><q id='Jr3UF'><span id='Jr3UF'><b id='Jr3UF'><form id='Jr3UF'><ins id='Jr3UF'></ins><ul id='Jr3UF'></ul><sub id='Jr3UF'></sub></form><legend id='Jr3UF'></legend><bdo id='Jr3UF'><pre id='Jr3UF'><center id='Jr3UF'></center></pre></bdo></b><th id='Jr3UF'></th></span></q></dt></tr></i><div id='Jr3UF'><tfoot id='Jr3UF'></tfoot><dl id='Jr3UF'><fieldset id='Jr3UF'></fieldset></dl></div>
                    <bdo id='Jr3UF'></bdo><ul id='Jr3UF'></ul>
                  <tfoot id='Jr3UF'></tfoot>
                    <legend id='Jr3UF'><style id='Jr3UF'><dir id='Jr3UF'><q id='Jr3UF'></q></dir></style></legend>