python - “无法获得窗口,中止”运行 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 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()
有任何想法吗?
解决方案
推荐阅读
- python - Project Euler 问题 8 Python 整数溢出
- html - “bootstrap min css 1 加载资源失败:net::err_file_not_found”
- python - 为什么django模型保存功能没有响应?
- java - 使用spring boot和crud如何同时更新两个类的列表(它们之间存在关系)
- r - %in% 没有给出正确的输出
- javascript - React 项目 - Moment Timezone 没有欧洲/伦敦的数据
- javascript - OpenLayers:编辑坐标只需在 div 中单击以更改值(使地图居中)
- node.js - 使用 Node.js 从 AWS Lambda 函数生成唯一主键的安全方法
- azure - Azure CDN Verizon Premium 隐藏 SAS 令牌 GET 方法错误 403
- authentication - 通过 2 个公共 URL 公开的 Keycloak 服务器