本文介绍了如何绕过 kivy 模块错误:ImportError: DLL load failed: The specified module could not be found?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[问题]如何绕过kivy模块错误: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] - 此片段取自 kiwi org 主页.

[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()

[电流输出]

[INFO              ] [Logger      ] Record log in C:Users	estUser.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:Users	estUserDesktop	est_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.

推荐答案

在 Windows 上,glewsdl2依赖项需要.我有同样的问题.安装所有依赖项

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

然后重新安装 kivy 对我有用.

and then reinstalling kivy worked for me.

这篇关于如何绕过 kivy 模块错误:ImportError: DLL load failed: The specified module could not be found?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 08:53