user3438538 user3438538 - 1 month ago 25
Python Question

How can I bypass kivy module error: ImportError: DLL load failed: The specified module could not be found?

[PROBLEM]
How can I bypass kivy module error: ImportError: DLL load failed: The specified module could not be found ?

Note: I have installed kivy with: pip install kivy.
Note: I have tried also with : python v 2.7.10 but to no avail.
Note: OS - Windows 7, 64-bit


[CODE] - this snippet is taken from kiwi org homepage.

from kivy.app import App
from kivy.uix.button import Button

class TestApp(App):
def build(self):
return Button(text='Hello World')

TestApp().run()


[CURRENT OUTPUT]

[INFO ] [Logger ] Record log in C:\Users\testUser\.kivy\logs\kivy_16-01-22_1.txt
[INFO ] [Kivy ] v1.9.1
[INFO ] [Python ] v2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)]
[INFO ] [Factory ] 179 symbols loaded

Traceback (most recent call last):
File "C:\Users\testUser\Desktop\test_kivy.py", line 1, in <module>
from kivy.app import App
File "C:\Python27\lib\site-packages\kivy\app.py", line 327, in <module>
from kivy.uix.widget import Widget
File "C:\Python27\lib\site-packages\kivy\uix\widget.py", line 219, in <module>
from kivy.graphics import (
File "C:\Python27\lib\site-packages\kivy\graphics\__init__.py", line 89, in <module>
from kivy.graphics.instructions import Callback, Canvas, CanvasBase, \
ImportError: DLL load failed: The specified module could not be found.

qwr qwr
Answer

On Windows, glew and sdl2 are required as dependencies. I had the same problem. Installing all the dependencies

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

and then reinstalling kivy worked for me.