[英]Error When Trying to Run Simple Kivy Program (Windows)
When trying to run the following program on my computer:尝试在我的计算机上运行以下程序时:
# First import an App class from kivy
from kivy.app import App
# Define App subclass
class TutorialApp(App):
pass
if __name__=="__main__":
TutorialApp().run()
After I added what was suggested( The last two lines ), I get two syntax errors, the first telling me to delete the colon and the second telling me to remove the indent, and then this:在我添加了建议的内容(最后两行)后,我收到了两个语法错误,第一个告诉我删除冒号,第二个告诉我删除缩进,然后是:
[INFO ] Kivy v1.8.0
[INFO ] [Logger ] Record log in C:\Users\rabbitrabbit\.kivy \logs\kivy_14-08-15_5.txt
[INFO ] [Factory ] 157 symbols loaded
[DEBUG ] [Cache ] register <kv.lang> with limit=None, timeout=Nones
[DEBUG ] [Cache ] register <kv.image> with limit=None, timeout=60s
[DEBUG ] [Cache ] register <kv.atlas> with limit=None, timeout=Nones
[INFO ] [Image ] Providers: img_tex, img_dds, img_gif (img_pygame, img_pil ignored)
[DEBUG ] [Cache ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG ] [Cache ] register <kv.shader> with limit=1000, timeout=3600s
[DEBUG ] [App ] Loading kv <C:\Python33\tutorial.kv>
[DEBUG ] [App ] kv <C:\Python33\tutorial.kv> not found
[DEBUG ] [Window ] Ignored <egl_rpi> (import error)
[DEBUG ] [Window ] Ignored <pygame> (import error)
[WARNING ] [WinPygame ] SDL wrapper failed to import!
[DEBUG ] [Window ] Ignored <sdl> (import error)
[DEBUG ] [Window ] Ignored <x11> (import error)
[CRITICAL ] [Window ] Unable to find any valuable Window provider at all!
[CRITICAL ] [App ] Unable to get a Window, abort.
According to the tutorial I'm following( http://inclem.net/2014/01/09/kivy-crash-course/1_making-a-simple-app/ ), the program should be able to run without problems.根据我正在关注的教程( http://inclem.net/2014/01/09/kivy-crash-course/1_making-a-simple-app/ ),该程序应该能够毫无问题地运行。 I've installed Kivy and Python 3.3.
我已经安装了 Kivy 和 Python 3.3。
If that's really your program, the problem is simply that it doesn't do anything.如果那真的是你的程序,那么问题就在于它什么都不做。 Use
TutorialApp().run()
to actually start the gui.使用
TutorialApp().run()
实际启动 gui。
Either way, that traceback is not an error.无论哪种方式,回溯都不是错误。
看起来您缺少pygame
的安装 - Kivy 安装未将其作为依赖项引入,因此您需要单独安装它 - 请参阅http://kivy.org/docs/installation/troubleshooting-macosx.html#无法找到任何有价值的窗口提供者错误
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.