sdl2 - ImportError: DLL load failed: The specified module could not be found and [CRITICAL] [App] Unable to get a Window, abort

I had the same problem. I solved this by removing Kivy and its dependencies first.

python -m pip uninstall kivy

python -m pip uninstall kivy.deps.sdl2

python -m pip uninstall kivy.deps.glew

python -m pip uninstall kivy.deps.gstreamer

python -m pip uninstall image

Now reinstalling everything except gstreamer.

python -m pip install --upgrade pip wheel setuptools

python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew --extra-index-url https://kivy.org/downloads/packages/simple/

python -m pip install kivy

It solved the error. Credits to Ben R's Answer.


07-2021, Python 3.9

The problem is that the PATH variable has not been set (Python installation from the Windows Store).

**from the windows menu/browser:

remove program

at the beginning remove any python installation, this will make life easier**

It is best to download python from python.org and install as ADMINISTRATOR as "CUSTOM" with a known path (for all users) IE c:/programs/python39

Be sure to check:

add to PATH variable to system

Now, after installing python - we log out and log back in. Then in the start menu look for CMD and run !!! as administrator

From the admin position, install as stated on the website: https://kivy.org/doc/stable-1.10.1/installation/installation-windows.html

ie:

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

and finally

python -m pip install kivy

and that solves the whole problem.

Ps. Ifyou write angin command IE:

    python -m pip install kivy.deps.angle

Location of files should be show as IE:

c:/programs/python39....

But not as your home directory

(But it will be if you run cmd as normal user...and then IT doesen't work.... But if you have all files on your home directory YOU HAVE TO REMOVE ALL BEFORE YOU START:

python -m pip uninstall docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew

And then (as admin): python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew


I had the very same problem, and for me the solution was to make use of virtualenv instead of venv. This forces Kivy to use a specific installation of Python.

  1. Download and install Python 3.7, since 3.8 doesn't seem to be supported yet (https://www.python.org/downloads/release/python-376/)

  2. Install virtualenv if not already installed

    pip install virtualenv

  3. Create a virtual environment, specifying the path to the newly installed Python version

    virtualenv --python=C:\path\to\Python37\python.exe my_venv

  4. Activate the new virtual environment

    my_venv/Scripts/activate.bat

  5. Install kivy according to Javapocalypse's answer

    python -m pip install --upgrade pip wheel setuptools
    
    python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew extra-index-url https://kivy.org/downloads/packages/simple/
    
    python -m pip install kivy