0

I am very new to the coding and Kivy business. I apologize for my ignorance. To preface this, I think there is something wrong with my PATH. Sometimes modules will never be recognized after I install them with pip, so that may be the issue. Recently, I have transitioned from Sublime Text to Visual Studio 2019. I have tried ALL of the tutorials offered on the internet. I believe the issue is ME and I do not understand what I am doing. Attached are all of the suggestions I have tried:

I have uninstalled and installed Kivy 4 or 5 times now and in all of these different configurations. If I send ANY dependency through to be downloaded, I guarantee it will tell me that it is already satisfied.

Here is the program:

import kivy

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

class FirstKivy(App):
    def build(self):
        return Label(text="Hello World")

if __name__ == '__main__':
    FirstKivy().run()
[INFO   ] [Logger      ] Record log in C:\Users\wlade\.kivy\logs\kivy_20-05-14_38.txt
[INFO   ] [deps        ] Successfully imported "kivy_deps.gstreamer" 0.2.0
[INFO   ] [deps        ] Successfully imported "kivy_deps.angle" 0.2.0
[INFO   ] [deps        ] Successfully imported "kivy_deps.glew" 0.2.0
[INFO   ] [deps        ] Successfully imported "kivy_deps.sdl2" 0.2.0
[INFO   ] [Kivy        ] v1.11.1
[INFO   ] [Kivy        ] Installed at "C:\Users\wlade\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\kivy\__init__.py"
[INFO   ] [Python      ] v3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 11:52:54) [MSC v.1900 64 bit (AMD64)]
[INFO   ] [Python      ] Interpreter at "C:\Users\wlade\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe"
[INFO   ] [Factory     ] 184 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. 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: The specified module could not be found.
  File "C:\Users\wlade\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\wlade\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\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.

Here is the error given to me by Visual Studio


  Message=1
  Source=C:\Users\wlade\source\repos\PythonApplication1\PythonApplication1\PythonApplication1.py
  StackTrace:
  File "C:\Users\wlade\source\repos\PythonApplication1\PythonApplication1\PythonApplication1.py", line 8, in build
    return Label(text="Hello World")
  File "C:\Users\wlade\source\repos\PythonApplication1\PythonApplication1\PythonApplication1.py", line 11, in <module>
    FirstKivy().run()

Thank you for your patience :)

1 Answers1

0

I have a same problem in my project but I solved it. I installed [kivy-deps.sdl2] and [kivy-deps.glew] package in my project then its started running. I use PyCharm for development tool and I installed the following procedure:

  1. Go to [Settings]

  2. Seltect [Project] and [Project Iterpreter]

  3. Add package using + kivy install package to run: [Kivy],[kivy-deps.sdl2] and [kivy-deps.glew]

Anshul Vyas
  • 633
  • 9
  • 19
RDD
  • 1
  • 1
  • Ah, I see, thank you! it looks like Kivy is more cooperative with Pycharm and Conda. I figured I would just uninstall everything that had to do with Python and Kivy and start over. Would definitely recommend if your modules are getting misplaced all the time. – BactrianFan May 17 '20 at 23:10