sdl2-ImportError:DLL加载失败:找不到指定的模块

时间:2019-08-20 05:37:57

标签: python python-3.x kivy

我是Kivy和python的新手。 我不好解释,所以这里是源代码和警告错误。 实际上已经从该站点https://kivy.org/doc/stable/installation/installation-windows.html

安装了Kivy及其附属程序

关于sdl2的错误,有人可以帮我吗?

这里是我要运行的代码:

import kivy
import PIL

from PIL import Image
from kivy.app import App
from kivy.uix.button import Label

class HelloKivy(App):
    def build(self):
        return Label(text="Hello Kivy")

helloKivy = HelloKivy()

helloKivy.run()

此处错误:

[INFO   ] [Logger      ] Record log in C:\Users\000831\.kivy\logs\kivy_19-08-20_27.txt
[INFO   ] [Kivy        ] v1.11.1
[INFO   ] [Kivy        ] Installed at "C:\Users\000831\PycharmProjects\asu\venv\lib\site-packages\kivy\__init__.py"
[INFO   ] [Python      ] v3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
[INFO   ] [Python      ] Interpreter at "C:\Users\000831\PycharmProjects\asu\venv\Scripts\python.exe"
[INFO   ] [Factory     ] 184 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_pil, img_gif (img_sdl2, img_ffpyplayer ignored)
[INFO   ] [Text        ] Provider: pil(['text_sdl2'] ignored)
[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: The specified module could not be found.
  File "C:\Users\000831\PycharmProjects\asu\venv\lib\site-packages\kivy\core\__init__.py", line 63, in core_select_lib
    fromlist=[modulename], level=0)
  File "C:\Users\000831\PycharmProjects\asu\venv\lib\site-packages\kivy\core\window\window_sdl2.py", line 27, in <module>
    from kivy.core.window._window_sdl2 import _WindowSDL2Storage

[CRITICAL] [App         ] Unable to get a Window, abort.

Process finished with exit code 1

0 个答案:

没有答案