每次运行代码时,都会显示并关闭kivy窗口,该如何解决呢?
from kivy.app import App
hello_world = App()
hello_world.run()
控制台:
C:\Users\Rafael\Anaconda3\envs\k35\python.exe C:/Dev/excript/app-comerciais-kivy/teste/main.py
[INFO ] [Logger ] Record log in C:\Users\Rafael\.kivy\logs\kivy_19-01-06_13.txt
[INFO ] [Kivy ] v1.10.1
[INFO ] [Python ] v3.5.6 |Anaconda, Inc.| (default, Aug 26 2018, 16:05:27) [MSC v.1900 64 bit (AMD64)]
[INFO ] [Factory ] 194 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded
[INFO ] [GL ] Backend used <glew>
[INFO ] [GL ] OpenGL version <b'4.6.0 NVIDIA 417.22'>
[INFO ] [GL ] OpenGL vendor <b'NVIDIA Corporation'>
[INFO ] [GL ] OpenGL renderer <b'GeForce GTX 1050 Ti/PCIe/SSE2'>
[INFO ] [GL ] OpenGL parsed version: 4, 6
[INFO ] [GL ] Shading version <b'4.60 NVIDIA'>
[INFO ] [GL ] Texture max size <32768>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [Base ] Start application main loop
Process finished with exit code -1073741819 (0xC0000005)
窗口将在出现后关闭几秒钟,未报告任何错误。 有什么办法解决这个问题?我在蟒蛇上安装python没问题。库导入没有错误,如果我添加按钮或标签没有错误,它会自动运行并自动退出