kivy: Kivy 1.9.1, ImportError while importing kivy.app.App

Installed fresh Python2.7.10, Kivy1.9.1 (following instructions from kivy.org website) on Windows7 64bit. I’m getting an ImportError when I run this code:

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


class ButtonApp(App):

    def build(self):
        return Button(text='TEST')


ButtonApp().run()

Console output:

E:\Python27\python.exe E:/workspace/TEST/test_kivy_1.9.1/main.py
[INFO              ] [Logger      ] Record log in C:\Users\Skerleton\.kivy\logs\kivy_16-01-04_38.txt
[INFO              ] [Kivy        ] v1.9.1
[INFO              ] [Python      ] v2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]
[INFO              ] [Factory     ] 179 symbols loaded
[DEBUG             ] [Cache       ] register <kv.lang> with limit=None, timeout=None
 Traceback (most recent call last):
   File "E:/workspace/TEST/test_kivy_1.9.1/main.py", line 1, in <module>
     from kivy.app import App
   File "E:\Python27\lib\site-packages\kivy\app.py", line 327, in <module>
     from kivy.uix.widget import Widget
   File "E:\Python27\lib\site-packages\kivy\uix\widget.py", line 219, in <module>
     from kivy.graphics import (
   File "E:\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.

Process finished with exit code 1

Kivy installed without issues, except for Gstreamer. This error is reported by another developer on kivy google group

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 26 (17 by maintainers)

Most upvoted comments

The gstreamer problem has been fixed. I also updated all the dependencies so I’d suggest you download them again with python -m pip install --upgrade docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew kivy.deps.gstreamer --extra-index-url https://kivy.org/downloads/packages/simple/ as this may fix your problem. Let us know.

Install the dependencies (skip gstreamer (~120MB) if not needed, see Kivy’s dependencies):

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

I reinstalled Python and Kivy with kivy.deps.sdl2==0.1.12, kivy.deps.gstreamer==0.1.6. It works!

e:\Python27>python share\kivy-examples\widgets\videoplayer.py
[INFO              ] [Logger      ] Record log in C:\Users\Skerleton\.kivy\logs\kivy_16-01-18_60.txt
[INFO              ] [Kivy        ] v1.9.1
[INFO              ] [Python      ] v2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)]
[INFO              ] [Factory     ] 179 symbols loaded
[INFO              ] [Image       ] Providers: img_tex, img_dds, img_gif, img_sdl2 (img_pil, img_ffpyplayer ignored)
[INFO              ] [Text        ] Provider: sdl2
[INFO              ] [VideoGstplayer] Using Gstreamer 1.7.1.0
[INFO              ] [Video       ] Provider: gstplayer
[INFO              ] [OSC         ] using <thread> for socket
[INFO              ] [Window      ] Provider: sdl2
[INFO              ] [GL          ] GLEW initialization succeeded
[INFO              ] [GL          ] OpenGL version <4.5.0 NVIDIA 347.88>
[INFO              ] [GL          ] OpenGL vendor <NVIDIA Corporation>
[INFO              ] [GL          ] OpenGL renderer <GeForce GTX 560 SE/PCIe/SSE2>
[INFO              ] [GL          ] OpenGL parsed version: 4, 5
[INFO              ] [GL          ] Shading version <4.50 NVIDIA>
[INFO              ] [GL          ] Texture max size <16384>
[INFO              ] [GL          ] Texture max units <32>
[INFO              ] [Window      ] auto add sdl2 input provider
[INFO              ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO              ] [GL          ] NPOT texture support is available
[INFO              ] [Base        ] Start application main loop