M
M
m1kz2020-04-30 20:04:12
Python
m1kz, 2020-04-30 20:04:12

Why doesn't the basic kivy python program work?

Similar issue: Why doesn't the basic python kivy program work?
program code:

from kivy.app import App


class Myapp(App):
    pass


if __name__ == "__main__":
    Myapp().run()


The output is:

[INFO ] [Logger ] Record log in C:\Users\User\.kivy\logs\kivy_20-04-30_15.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.1.18
[ INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.1.10
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.1.12
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.1.23
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "C:\Python\lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 00:11:34) [MSC v.1916 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Python\python.exe"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_gif (img_sdl2, img_pil, img_ffpyplayer ignored)
[CRITICAL] [Window ] Unable to find any valuable Window provider. Please enable debug logging (eg 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: %1 is not a Win32 application.
File "C:\Python\lib\site-packages\kivy\core\__init__.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "C:\Python\lib\site-packages\ kivy\core\window\window_sdl2.py", line 27, in
from kivy.core.window._window_sdl2 import _WindowSDL2Storage

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

What to do?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
m1kz, 2020-05-09
@m1kz

I reinstalled everything (Python 3.7). The settings are all default and everything worked.

S
Sergey Karbivnichy, 2020-04-30
@hottabxp

sdl2 - ImportError: DLL load failed: %1 is not a Win32 application.
- most likely the sdl2.dll library is of the wrong capacity. If x64 is installed, install x32 and vice versa.

B
BitNeBolt, 2020-04-30
@BitNeBolt

As far as I remember, a constructor should be written in the class:

def build(self):
        return

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question