sdl2 - ImportError: DLL load failed while importing _window_sdl2:
import kivyfrom kivy.app import App
from kivy.uix.button import Label
class TestApp(App):
def build(self):
return Label(text="Hello World!")
if __name__ == '__main__':
TestApp().run()
C:\Users\Administrator\AppData\Local\Programs\Python\Python39\python.exe C:/Users/Administrator/Desktop/main.py
Record log in C:\Users\Administrator\.kivy\logs\kivy_21-01-05_76.txt
Successfully imported "kivy_deps.gstreamer" 0.3.1
Successfully imported "kivy_deps.angle" 0.3.0
Successfully imported "kivy_deps.glew" 0.3.0
Successfully imported "kivy_deps.sdl2" 0.3.1
Successfully imported "kivy_deps.sdl2_dev" 0.3.1
v2.0.0
Installed at "C:\Users\Administrator\AppData\Roaming\Python\Python39\site-packages\kivy\__init__.py"
v3.9.0 (tags/v3.9.0:9cf6752, Oct5 2020, 15:34:40)
Interpreter at "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\python.exe"
186 symbols loaded
Providers: img_tex, img_dds, img_pil (img_sdl2, img_ffpyplayer ignored)
Provider: pil(['text_sdl2'] ignored)
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: 找不到指定的模块。
File "C:\Users\Administrator\AppData\Roaming\Python\Python39\site-packages\kivy\core\__init__.py", line 58, in core_select_lib
mod = __import__(name='{2}.{0}.{1}'.format(
File "C:\Users\Administrator\AppData\Roaming\Python\Python39\site-packages\kivy\core\window\window_sdl2.py", line 27, in <module>
from kivy.core.window._window_sdl2 import _WindowSDL2Storage
Unable to get a Window, abort.
进程已结束,退出代码1
所有需要的环境量全部安装了
python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew 都有,在我朋友的电脑上就能成功,不知道什么原因求大神帮助 C:\Users\Administrator\AppData\Local\Programs\Python\Python39\python.exe C:/Users/Administrator/Desktop/main.py
Record log in C:\Users\Administrator\.kivy\logs\kivy_21-01-05_76.txt
Successfully imported "kivy_deps.gstreamer" 0.3.1
Successfully imported "kivy_deps.angle" 0.3.0
Successfully imported "kivy_deps.glew" 0.3.0
Successfully imported "kivy_deps.sdl2" 0.3.1
Successfully imported "kivy_deps.sdl2_dev" 0.3.1
v2.0.0
Installed at "C:\Users\Administrator\AppData\Roaming\Python\Python39\site-packages\kivy\__init__.py"
v3.9.0 (tags/v3.9.0:9cf6752, Oct5 2020, 15:34:40)
Interpreter at "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\python.exe"
186 symbols loaded
Providers: img_tex, img_dds, img_pil (img_sdl2, img_ffpyplayer ignored)
Provider: pil(['text_sdl2'] ignored)
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: 找不到指定的模块。
File "C:\Users\Administrator\AppData\Roaming\Python\Python39\site-packages\kivy\core\__init__.py", line 58, in core_select_lib
mod = __import__(name='{2}.{0}.{1}'.format(
File "C:\Users\Administrator\AppData\Roaming\Python\Python39\site-packages\kivy\core\window\window_sdl2.py", line 27, in <module>
from kivy.core.window._window_sdl2 import _WindowSDL2Storage
Unable to get a Window, abort.
进程已结束,退出代码1
页:
[1]