Kivy导入错误,无法找到模块

时间:2016-02-26 21:47:05

标签: python-2.7 kivy

第一次尝试使用Python Kivy,pip install kivy和pygame并使用pip freeze进行检查。当我只使用" import kivy"没有错误,并给了我这个:

[INFO              ] [Logger      ] Record log in C:\Users\KubiK\.kivy\logs\kivy_16-02-26_50.txt
[INFO              ] [Kivy        ] v1.9.1
[INFO              ] [Python      ] v2.7.10 |Anaconda 2.3.0 (64-bit)| (default, May 28 2015, 16:44:52) [MSC v.1500 64 bit (AMD64)]

但是当我从kivy.app import App"添加"时,它给了我这个错误:

[INFO              ] [Logger      ] Record log in C:\Users\KubiK\.kivy\logs\kivy_16-02-26_51.txt
[INFO              ] [Kivy        ] v1.9.1
[INFO              ] [Python      ] v2.7.10 |Anaconda 2.3.0 (64-bit)| (default, May 28 2015, 16:44:52) [MSC v.1500 64 bit (AMD64)]
[INFO              ] [Factory     ] 179 symbols loaded
 Traceback (most recent call last):
   File "C:\Users\KubiK\Dropbox\Python_Exercises_KW\Kivy\BooksNTuts\AlexanderTaylor\tut.py", line 2, in <module>
     from kivy.app import App
   File "C:\Users\KubiK\AppData\Local\Dato\Dato Launcher\lib\site-packages\kivy\app.py", line 327, in <module>
     from kivy.uix.widget import Widget
   File "C:\Users\KubiK\AppData\Local\Dato\Dato Launcher\lib\site-packages\kivy\uix\widget.py", line 219, in <module>
     from kivy.graphics import (
   File "C:\Users\KubiK\AppData\Local\Dato\Dato Launcher\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.
[Finished in 0.2s with exit code 1]
[shell_cmd: python -u "C:\Users\KubiK\Dropbox\Python_Exercises_KW\Kivy\BooksNTuts\AlexanderTaylor\tut.py"]

1 个答案:

答案 0 :(得分:0)

你可能正在寻找这个issue。但是,我建议你使用sdl2作为提供者。 This可以帮助您轻松安装。