Cannot run kivy 1.7.1 on MacOS X 10.8.4

482 views
Skip to first unread message

r3o...@gmail.com

unread,
Jul 10, 2013, 5:53:07 PM7/10/13
to kivy-...@googlegroups.com
I am trying out kivy (1.7.1) on my Mac (10.8.4) but I can't get it to run. I downloaded the release binary, dragged the application into /Applications and ran the shell script to make a symlink so I can run from the command line. Running the introductory demo app using the command line I see:

$ kivy basicApp.py 
...
ERROR: pygame.macosx import FAILED
[WARNING] [WinPygame   ] SDL wrapper failed to import!
[DEBUG  ] [Window      ] Ignored <sdl> (import error)
[DEBUG  ] [Window      ] Ignored <x11> (import error)
[CRITICAL] [Window      ] Unable to find any valuable Window provider at all!
[CRITICAL] [App         ] Unable to get a Window, abort.
 Exception SystemExit: 1 in 'kivy.properties.dpi2px' ignored
[CRITICAL] [App         ] Unable to get a Window, abort.

I assume kivy has its own python and support libs, but in case it matters, my default python is python.org's 64-bit python (for MacOS 10.6 and later). My python it has its own pygame and SDL (in /Library/Frameworks) so I tried deinstalling those, but it made no difference.

Also, I notice that when I run the app I can get an about box, but New and Open... in the file menu are grayed out.

Any suggestions?

Adam Pospíšil

unread,
Jul 11, 2013, 7:11:40 AM7/11/13
to kivy-...@googlegroups.com


On Wednesday, July 10, 2013 11:53:07 PM UTC+2, r3o...@gmail.com wrote:
I assume kivy has its own python and support libs, but in case it matters, my default python is python.org's 64-bit python (for MacOS 10.6 and later). My python it has its own pygame and SDL (in /Library/Frameworks) so I tried deinstalling those, but it made no difference.

Also, I notice that when I run the app I can get an about box, but New and Open... in the file menu are grayed out.

Any suggestions?

I don't know if it will help you, but this is how you can view (and change) what python is used by kivy:
  • Go to your Applications folder
  • right-click Kivy and choose 'Show Package Contents' 
  • look into Contents/Resources/script
  • path to python should be on the last row of the 'script' file

ZenCODE

unread,
Jul 11, 2013, 7:15:03 AM7/11/13
to kivy-...@googlegroups.com
Hi there

There is a pull request pending that seems to address this.


Peace let me know it it works for you as that might help get the request merged sooner.

Thanks. Peace out

On Wednesday, July 10, 2013 11:53:07 PM UTC+2, r3o...@gmail.com wrote:

Tibor Juhász

unread,
Sep 4, 2013, 2:39:01 PM9/4/13
to kivy-...@googlegroups.com
Hi there,

I have a problem with my python,kivy test application. I got the following error:

[INFO   ] Kivy v1.8.0-dev
[INFO   ] [Logger      ] Record log in /Users/Tibi/.kivy/logs/kivy_13-09-04_102.txt
[INFO   ] [Factory     ] 155 symbols loaded
[DEBUG  ] [Cache       ] register <kv.lang> with limit=None, timeout=Nones
[DEBUG  ] [Cache       ] register <kv.image> with limit=None, timeout=60s
[DEBUG  ] [Cache       ] register <kv.atlas> with limit=None, timeout=Nones
[INFO   ] [Image       ] Providers: img_imageio, img_tex, img_dds, img_pygame, img_gif (img_pil ignored)
[DEBUG  ] [Cache       ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG  ] [Cache       ] register <kv.shader> with limit=1000, timeout=3600s
[INFO   ] [Text        ] Provider: pygame
[DEBUG  ] [Window      ] Ignored <egl_rpi> (import error)
[INFO   ] [Window      ] Provider: pygame(['window_egl_rpi'] ignored)
[WARNING] [WinPygame   ] SDL wrapper failed to import!
[DEBUG  ] [Window      ] Ignored <sdl> (import error)
[DEBUG  ] [Window      ] Ignored <x11> (import error)
[CRITICAL] [Window      ] Unable to find any valuable Window provider at all!
[DEBUG  ] [App         ] Loading kv <./example.kv>
[CRITICAL] [App         ] Unable to get a Window, abort.

Kivy version is 1.8.0-dev
Python version is Python 2.7.5
GCC is 4.2.1
pyGame is 1.9.2 for mac os x 10.7 :(
OS is Mac OS X 10.8.3

And it is my simple code:

#!/usr/bin/python
import pygame
import kivy

from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.properties import ObjectProperty, NumericProperty, StringProperty
from kivy.uix.button import Button
from kivy.core.window import Window
from kivy.config import Config

Config.set('graphics', 'width', '524')
Config.set('graphics', 'height', '668')
Config.set('graphics', 'resizable', (0, 1))

class Example(FloatLayout):

pot = NumericProperty()
def __init__(self, **kwargs):
super(Example, self).__init__(**kwargs)

def call(self):
self.pot += 100
def fold(self):
print "Fold"
class ExampleApp(App):
def build(self):
return Example(info=0)
if __name__ == '__main__':
ExampleApp().run()

And I use kv file as well, it is:

#:kivy 1.0

<Example>:
 
canvas:
    Color:
        rgb: 1, 1, 0
    Rectangle:
        pos: self.pos
        size: self.size
Button:
text: 'Call'
on_press: root.call()
size: (100,50)
size_hint: (None, None)
pos: (0,0)
Button:
text: 'Fold'
on_press: root.fold()
size: (100,50)
size_hint: (None, None)
pos: (105,0)
Label:
text: 'Pot ' + str(root.pot)
size: (100,10)
size_hint: (None, None)
pos: (100, 200)
color: (0, 0, 0, .9)

If anybody know solution for this problem, please help.

Thanks,
Tibi

timger™

unread,
Sep 4, 2013, 10:33:35 PM9/4/13
to kivy-...@googlegroups.com

On Thu, Sep 5, 2013 at 2:39 AM, Tibor Juhász <tibij...@gmail.com> wrote:
[WARNING] [WinPygame   ] SDL wrapper failed to import!

​you may need install SDL ​



timger™  

Tibor Juhász

unread,
Sep 5, 2013, 4:20:47 AM9/5/13
to kivy-...@googlegroups.com
SDL already installed :( 
Interesting that my test app was running in the first and second times, after throw the error message.

T
Reply all
Reply to author
Forward
0 new messages