kivy in python 3.6

0

I'm using Python 3.6.2 and I'm learning kivy . The script does not run because sdl2 is missing. I already installed pillow and pillow-PIL , but I can not install sdl2 . I tried pysdl2 and it did not 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

Can anyone help?

    
asked by anonymous 15.02.2018 / 22:11

1 answer

0

Try installing the full Kivy package:

Kivy 64-bit:

link

or 32 bit Kivy:

link

  

Check the version of your operating system for this.

Install using pip:

pip install https://kivy.org/downloads/appveyor/kivy/Kivy-1.10.1.dev0-cp36-cp36m-win32.whl
    
22.05.2018 / 20:43