Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

python - 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:UsersestUser.kivylogskivy_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:UsersestUserDesktopest_kivy.py", line 1, in <module>
     from kivy.app import App
   File "C:Python27libsite-packageskivyapp.py", line 327, in <module>
     from kivy.uix.widget import Widget
   File "C:Python27libsite-packageskivyuixwidget.py", line 219, in <module>
     from kivy.graphics import (
   File "C:Python27libsite-packageskivygraphics\__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.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...