[英]Kivy error - Unable to find any valuable Window provider
This is my code这是我的代码
''' '''
import kivy
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.button import Button
class Audibuddy(App):
def build(self):
return Label(text = "Does this work")
if __name__ == "__main__":
Audibuddy().run()
''' When i try to run this i get the following error: ''' 当我尝试运行此程序时,出现以下错误:
CRITICAL] [Window ] Unable to find any valuable Window provider. CRITICAL] [Window ] 无法找到任何有价值的 Window 提供程序。 Please enable debug logging (eg add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes sdl2 - ImportError: DLL load failed while importing _window_sdl2: The specified module could not be found.
请启用调试日志(例如,如果从命令行运行,则添加 -d,或更改配置中的日志级别)并重新运行您的应用程序以确定潜在原因 sdl2 - ImportError: DLL load failed while importing _window_sdl2: The specified module can找不到。
https://i.stack.imgur.com/5LcCx.png https://i.stack.imgur.com/5LcCx.png
I am using pycharm,I tried to run the same code in vscode and got the same error.我正在使用 pycharm,我尝试在 vscode 中运行相同的代码并得到相同的错误。
Well I tried this code and it does work, your kivy installation might be faulty.好吧,我试过这段代码,它确实有效,你的 kivy 安装可能有问题。 Did you install kivy on the pycharm settings?
您是否在 pycharm 设置上安装了 kivy?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.