Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

python

kivy

[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.
like image 385
george Avatar asked Jan 22 '16 09:01

george


2 Answers

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.

like image 78
qwr Avatar answered Sep 28 '22 00:09

qwr


If you have already installed kivy in windows without installing dependencies use these command separately It will work,

python -m pip install kivy.deps.sdl2

python -m pip install kivy.deps.glew 
like image 27
Sudeepa Nadeeshan Avatar answered Sep 28 '22 01:09

Sudeepa Nadeeshan