Python “;无法获取窗口,中止”;运行kivy应用程序
我刚从kivy开始,我无法克服这个错误。 我在用pycharmPython “;无法获取窗口,中止”;运行kivy应用程序,python,python-3.x,pycharm,kivy,Python,Python 3.x,Pycharm,Kivy,我刚从kivy开始,我无法克服这个错误。 我在用pycharm [CRITICAL] [Window ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify p
[CRITICAL] [Window ] Unable to find any valuable Window provider. Please enable debug logging (e.g. 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.
[CRITICAL] [App ] Unable to get a Window, abort.
这是我的密码:
import kivy
from kivy.app import App
from kivy.uix.label import Label
class MyApp(App):
def build(self):
return Label(text="Hello world!")
if __name__ == "__main__":
MyApp().run()
有什么想法吗?它对我有用(win10 64位,Anaconda)。您使用的是哪个OS\Python版本?Python 3.8,windows 10什么是Anaconda?Anaconda是一个Python发行版,包含许多库和Spyder IDE:我在没有Anaconda的情况下运行了您的代码,它仍然可以工作。请查看此页面以了解可能的解决方案: