python出现sdl2找不到指定模块的解决方法 | Hlwdy's blog
python出现sdl2找不到指定模块的解决方法
发表于 2020-06-24 共 152 字
分类于 python

python出现sdl2找不到指定模块的解决方法

在安装完Kivy后,引用可能会出现类似以下的错误

[DEBUG  ] Window: Ignored <sdl2> (import error)
[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: 找不到指定的模块。

这里是因为缺少sdl2模块,于是我们使用pip下载并安装这个模块:kivy-deps.glew

pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew

最后,问题得以解决。

筛选文章
类别选择 (分类/标签)
全屏 关闭