<small id='9KFbj'></small><noframes id='9KFbj'>

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

      1. 无法获得窗口,中止

        时间:2023-10-10

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

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

                <bdo id='NwGSt'></bdo><ul id='NwGSt'></ul>
                  <legend id='NwGSt'><style id='NwGSt'><dir id='NwGSt'><q id='NwGSt'></q></dir></style></legend>
                    <tbody id='NwGSt'></tbody>

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

                  问题描述

                  我在运行 Kivy hello world 程序时遇到了一个常见错误.我已经尝试过在这里看到的解决方案:手动安装 gstreamer,将其添加到 PATH 并安装 PySDL2.我的操作系统是 Windows 7,所有其他版本信息都在错误日志中.

                  I'm getting what seems to be a common error running the Kivy hello world program. I've tried the solutions I've seen here: manually install gstreamer, adding it to PATH and installing PySDL2. My OS is Windows 7, all other version info is in the error log.

                  # you need this two lines:
                  import os
                  os.environ['KIVY_IMAGE'] = 'pil,sdl2'
                  
                  #kivy program
                  from kivy.app import App
                  from kivy.uix.button import Button
                  
                  class TestApp(App):
                      def build(self):
                          return Button(text='Hello World')
                  
                  TestApp().run()
                  

                  错误日志:

                  [INFO              ] [Logger      ] Record log in C:Usersxyz.kivylogskivy_16-11-19_11.txt
                  [INFO              ] [Kivy        ] v1.9.1
                  [INFO              ] [Python      ] v2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)]
                  [INFO              ] [Factory     ] 179 symbols loaded
                  [INFO              ] [Image       ] Providers: img_pil, img_sdl2 (img_tex, img_dds, img_ffpyplayer, img_gif ignored)
                  [INFO              ] [Text        ] Provider: sdl2
                  [INFO              ] [OSC         ] using <thread> for socket
                  [INFO              ] [Window      ] Provider: sdl2
                  [INFO              ] [GL          ] GLEW initialization succeeded
                  [INFO              ] [GL          ] OpenGL version <3.1.0 - Build 8.15.10.2538>
                  [INFO              ] [GL          ] OpenGL vendor <Intel>
                  [INFO              ] [GL          ] OpenGL renderer <Intel(R) HD Graphics Family>
                  [INFO              ] [GL          ] OpenGL parsed version: 3, 1
                  [INFO              ] [GL          ] Shading version <1.40  - Intel Build 8.15.10.2538>
                  [INFO              ] [GL          ] Texture max size <8192>
                  [INFO              ] [GL          ] Texture max units <16>
                  [INFO              ] [Shader      ] fragment shader: <No errors.>
                  [INFO              ] [Shader      ] vertex shader: <No errors.>
                  [INFO              ] [Shader      ] program: <No errors.>
                  [CRITICAL          ] [Window      ] Unable to find any valuable Window provider at all!
                  sdl2 - AttributeError: tobytes
                    File "C:Program Filespython27libsite-packageskivycore\__init__.py", line 67, in core_select_lib
                      cls = cls()
                    File "C:Program Filespython27libsite-packageskivycorewindowwindow_sdl2.py", line 138, in __init__
                      super(WindowSDL, self).__init__()
                    File "C:Program Filespython27libsite-packageskivycorewindow\__init__.py", line 722, in __init__
                      self.create_window()
                    File "C:Program Filespython27libsite-packageskivycorewindowwindow_sdl2.py", line 255, in create_window
                      super(WindowSDL, self).create_window()
                    File "C:Program Filespython27libsite-packageskivycorewindow\__init__.py", line 897, in create_window
                      self.render_context = RenderContext()
                    File "kivygraphicsinstructions.pyx", line 756, in kivy.graphics.instructions.RenderContext.__init__ (kivygraphicsinstructions.c:10729)
                    File "C:Program Filespython27libsite-packageskivycoreimage\__init__.py", line 512, in __init__
                      self.filename = arg
                    File "C:Program Filespython27libsite-packageskivycoreimage\__init__.py", line 700, in _set_filename
                      mipmap=self._mipmap, nocache=self._nocache)
                    File "C:Program Filespython27libsite-packageskivycoreimage\__init__.py", line 430, in load
                      im = loader(filename, **kwargs)
                    File "C:Program Filespython27libsite-packageskivycoreimage\__init__.py", line 198, in __init__
                      self._data = self.load(filename)
                    File "C:Program Filespython27libsite-packageskivycoreimageimg_pil.py", line 101, in load
                      return list(self._img_read(im))
                    File "C:Program Filespython27libsite-packageskivycoreimageimg_pil.py", line 86, in _img_read
                      img_tmp.mode.lower(), img_tmp.tobytes())
                    File "C:Program Filespython27libsite-packagesPILImage.py", line 514, in __getattr__
                      raise AttributeError(name)
                  
                  [CRITICAL          ] [App         ] Unable to get a Window, abort.
                   Exception SystemExit: 1 in 'kivy.properties.dpi2px' ignored
                  [CRITICAL          ] [App         ] Unable to get a Window, abort.
                  

                  推荐答案

                  在 cmd 中转到 python34 然后到 Scripts 并安装以下内容:

                  In cmd go to python34 and then to Scripts and install the following:

                  pip install --upgrade pip wheel setuptools
                  pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
                  pip install kivy.deps.gstreamer
                  pip install kivy.deps.angle
                  pip install kivy
                  

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

                  上一篇:Discord.py:NameError:未定义名称“意图" 下一篇:您如何使用 kivy 检查键盘事件?

                  相关文章

                  最新文章

                    <bdo id='Eoy41'></bdo><ul id='Eoy41'></ul>

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

                      <legend id='Eoy41'><style id='Eoy41'><dir id='Eoy41'><q id='Eoy41'></q></dir></style></legend>

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