猕猴桃黑窗口

时间:2019-06-12 10:35:47

标签: python python-3.x kivy

尝试奇特这个最小的例子已经失败了。

#! /usr/bin/env python3.6

from platform import python_version
from kivy.app import App
from kivy.uix.button import Button

class TestApp(App):
  def build(self):
    return Button(text='hello world')

if __name__ == '__main__':
  print('python version: ' + python_version())
  TestApp().run()

它会打开一个全黑的窗口,并且其中似乎没有按钮。

Screenshot

输出如下:

[INFO   ] [Logger      ] Record log in C:\Users\removed\.kivy\logs\kivy_19-06-12_11.txt
[INFO   ] [Kivy        ] v1.10.1
[INFO   ] [Python      ] v3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 13:35:33) [MSC v.1900 64 bit (AMD64)]
[INFO   ] [Factory     ] 194 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO   ] [Text        ] Provider: sdl2
python version: 3.6.7
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [Window      ] Activate GLES2/ANGLE context
[INFO   ] [GL          ] Using the "OpenGL" graphics system
[INFO   ] [GL          ] Backend used <angle_sdl2>
[INFO   ] [GL          ] OpenGL version <b"OpenGL ES 2.0 (ANGLE 2.1.0.b'')">
[INFO   ] [GL          ] OpenGL vendor <b'Google Inc.'>
[INFO   ] [GL          ] OpenGL renderer <b'ANGLE (Intel(R) HD Graphics 3000 Direct3D11 vs_4_1 ps_4_1)'>
[INFO   ] [GL          ] OpenGL parsed version: 2, 0
[INFO   ] [GL          ] Shading version <b"OpenGL ES GLSL ES 1.00 (ANGLE 2.1.0.b'')">
[INFO   ] [GL          ] Texture max size <8192>
[INFO   ] [GL          ] Texture max units <16>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [Base        ] Start application main loop
[INFO   ] [GL          ] NPOT texture support is available
[INFO   ] [Base        ] Leaving application in progress...

我安装了以下模块

pip
wheel
setuptools
docutils
pygments
pypiwin32
kivy_deps.sdl2
kivy_deps.angle
kivy_deps.gstreamer
kivy

我正在Windows 10和Python 3.6上运行它

0 个答案:

没有答案