Код:
from kivy.app import App
from kivy.uix.widget import Widget
import kivy
kivy.require('2.0.0')
class PongGame(Widget):
pass
class PongApp(App):
def build(self):
return PongGame()
if __name__ == '__main__':
PongApp().run()
Вывод:
[INFO ] [Logger ] Record log in C:\Users\User\.kivy\logs\kivy_21-06-02_9.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.3.2
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.3.0
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.3.0
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.3.1
[INFO ] [Kivy ] v2.0.0
[INFO ] [Kivy ] Installed at "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Program Files\Python37\python.exe"
[INFO ] [Factory ] 186 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_pil (img_sdl2, img_ffpyplayer 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: Не найден указанный модуль.
File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\kivy\core\__init__.py", line 62, in core_select_lib
fromlist=[modulename], level=0)
File "C:\Users\User\AppData\Roaming\Python\Python37\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.