Kivy Issue – Unable to get a Window, abort

  kivy, pip, python, python-3.x, visual-studio

Problem:

I am tyring to run kivy for the first time for my python 3.9 project but I get the following error:

Python : 3.9

OS: Windows 10

Installation Method:

python -m pip install --upgrade pip wheel setuptools
python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
python -m pip install kivy.deps.gstreamer
python -m pip install kivy.deps.angle
python -m pip install kivy

Error:

Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

[INFO ] [Logger ] Record log in C:UsersUser.kivylogskivy_21-09-18_23.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.3.2
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.3.0
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.3.0
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.3.1
[INFO ] [Kivy ] v2.0.0
[INFO ] [Kivy ] Installed at "C:UsersUserAppDataLocalPackagesPythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0LocalCachelocal-packagesPython39site-packageskivy_init_.py"
[INFO ] [Python ] v3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:UsersUserAppDataLocalMicrosoftWindowsAppsPythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0python.exe"
[INFO ] [Factory ] 186 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds (img_sdl2, img_pil, img_ffpyplayer 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 while importing window_sdl2: The specified module could not be found.
File "C:UsersUserAppDataLocalPackagesPythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0LocalCachelocal-packagesPython39site-packageskivycore_init.py", line 58, in core_select_lib
mod = import(name='{2}.{0}.{1}'.format(
File "C:UsersUserAppDataLocalPackagesPythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0LocalCachelocal-packagesPython39site-packageskivycorewindowwindow_sdl2.py", line 27, in
from kivy.core.window._window_sdl2 import _WindowSDL2Storage

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

Code:

from kivy.app import App

class TheLabApp(App):
   pass

TheLabApp().run()

Source: Python Questions

LEAVE A COMMENT