0

Like i mentioned i finally got Kivy to compile in Eclipse Pydev for Windows 7 without any errors. When i ran the file i received that error and of course no window popped up. Does anyone know why and how to fix the error?

main.py

import kivy
kivy.require('1.9.0')  # @UndefinedVariable

from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.lang import Builder

presentation = Builder.load_file("test.kv")

class StartScreen(FloatLayout):
    pass


class TestApp(App):

    def build(self):
        return presentation



if __name__=='__main__':
    TestApp().run()

test.kv #:kivy 1.9

<StartScreen>:
    orientation: 'vertical'
    canvas:
        Color:
            rgba: 1,0,1,1
        Rectangle:
            source: 'kivy/graphics/blu.png'

    FloatLayout:

I went through in made sure pygame was installed and i was able to import it without erros. I have Cython installed as well as it is a dependency o f Kivy. Getting new error after i upgraded. Seems like the same error but different:

[INFO              ] [Logger      ] Record log in C:\Users\qzfyrp\.kivy\logs\kivy_15-08-31_29.txt
[INFO              ] [Kivy        ] v1.9.0
[INFO              ] [Python      ] v3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)]
[INFO              ] [Factory     ] 173 symbols loaded
[INFO              ] [Image       ] Providers: img_tex, img_dds, img_gif, img_pil (img_sdl2, img_ffpyplayer ignored)
[CRITICAL          ] [Window      ] Unable to find any valuable Window provider at all!
sdl2 - ImportError: DLL load failed: The specified module could not be found.
  File "C:\Kivy\kivy34\kivy\core\__init__.py", line 57, in core_select_lib
    fromlist=[modulename], level=0)
  File "C:\Kivy\kivy34\kivy\core\window\window_sdl2.py", line 26, in <module>
    from kivy.core.window._window_sdl2 import _WindowSDL2Storage

[CRITICAL          ] [App         ] Unable to get a Window, abort.

Edit: Ok. At first when i started this i was able to get at least a screen to come up when i ran this through kivy.bat. No when i try to run this through kivy.bat i get the same error i am getting in Eclipse.

mri3
  • 256
  • 3
  • 18

1 Answers1

1

I had the same error in LiClipse and solved it by following the instructions in the last post at Kivy, Eclipse and PyDev (also PyPy).

Just open Window -> Preferences, navigate in the tree to PyDev -> Interpreters -> Python Interpreter go to the flag Environment and add to the Variable PATH your SDL2 directory.

Community
  • 1
  • 1
Beginner
  • 11
  • 1