0

I have a problem when trying to run a simple code in VS Code for an app using Kivy Lib.

I already installed all the components to run kivy.

The code I use:

import kivy
kivy.require('1.11.1') # replace with your current kivy version !

from kivy.app import App
from kivy.uix.label import Label

class MyApp(App):

    def build(self):
        return Label(text='Hello world')

if __name__ == '__main__':
    MyApp().run()

The problem I have is this (in the log) ... things working and ...

[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: Le module spécifié est introuvable. File "C:\Users\asus\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\kivy\core_init_.py", line 63, in core_select_lib fromlist=[modulename], level=0) File "C:\Users\asus\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\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.

image

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Khalil
  • 1
  • Why are you using square brackets in the last if statement? There's no need to. – Daniel Oct 30 '20 at 21:45
  • plenty to read here https://stackoverflow.com/questions/40697876/unable-to-get-a-window-abort – Abhishek Rai Oct 30 '20 at 21:46
  • It didn't change anything daniel : / , abrar I read it al land tried it all for the past 7 hours :( the problem is in the sdl2 I think but the file is normal I checked , everything is installed correctly : ( – Khalil Oct 31 '20 at 03:53

0 Answers0