kivy in python 3.6

Asked

Viewed 798 times

0

I am using Python 3.6.2 and am learning the kivy. The script does not rotate because it lacks the sdl2. I already installed the pillow and the pillow-PIL, but I can’t install the sdl2. I tried the pysdl2 and it didn’t work.

Script I’m trying to execute:

from kivy.app import App
from kivy.uix.button import Button

class Test(App):
    def build(self):
        return Button()

Test().run()

Error message:

[INFO   ] [Logger      ] Record log in C:\Users\Paulo\.kivy\logs\kivy_18-02-15_39.txt
[INFO   ] [Kivy        ] v1.10.0
[INFO   ] [Python      ] v3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)]
[INFO   ] [Factory     ] 194 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.
sdl2 - ImportError: DLL load failed: The specified module could not be found.
  File "C:\Users\Paulo\PycharmProjects\kivy\venv\lib\site-packages\kivy\core\__init__.py", line 59, in core_select_lib
    fromlist=[modulename], level=0)
  File "C:\Users\Paulo\PycharmProjects\kivy\venv\lib\site-packages\kivy\core\window\window_sdl2.py", line 26, in <module>
    from kivy.core.window._window_sdl2 import _WindowSDL2Storage

[CRITICAL] [App         ] Unable to get a Window, abort.
 Exception ignored in: 'kivy.properties.dpi2px'
 Traceback (most recent call last):
   File "C:\Users\Paulo\PycharmProjects\kivy\venv\lib\site-packages\kivy\utils.py", line 496, in __get__
     retval = self.func(inst)
   File "C:\Users\Paulo\PycharmProjects\kivy\venv\lib\site-packages\kivy\metrics.py", line 174, in dpi
     EventLoop.ensure_window()
   File "C:\Users\Paulo\PycharmProjects\kivy\venv\lib\site-packages\kivy\base.py", line 127, in ensure_window
     sys.exit(1)
 SystemExit: 1
[CRITICAL] [App         ] Unable to get a Window, abort.

Process finished with exit code 1

Anyone can help?

  • Quite complicated to run on Windows, whenever I tried I ended up leaving aside and going back to linux, even more than if you are thinking of using buildozer to generate an apk, the problem is even bigger, since being python > 3 buildozer needs a package crystax-ndk-... to make it work. I would recommend linux with a venv python 2.7, for ease terms Ubuntu based distro.

1 answer

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.