Question

I've been trying to get Kivy to work on my Mac (Lion), but I've been encountering issues. I followed the instructions on the Kivy site, and since Kivy 1.8 supports Python 3, I wanted to run it with 3.3, and I finally got that to work, by editing the kivy file to point to 3.3 instead of 2.7. I tried drop a .py program on the Kivy icon, the app opened but nothing happened. So I tried to run it from the command line. It opened 3.3, as expected, but I got the following error.

Python 3.3.4 (default, Mar  6 2014, 20:14:14) 
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Applications/Kivy.app/Contents/Resources/lib/sitepackages/pygame/__init__.py", line 127, in <module>
from pygame.base import *
ImportError: dlopen(/Applications/Kivy.app/Contents/Resources/lib/sitepackages/pygame/base.so, 2): Symbol not found: _PyCObject_Type
Referenced from: /Applications/Kivy.app/Contents/Resources/lib/sitepackages/pygame/base.so
Expected in: flat namespace
in /Applications/Kivy.app/Contents/Resources/lib/sitepackages/pygame/base.so

I have no idea why I would get this error, since I previously installed pygame for 3.3, and import pygame or from pygame.base import * work error free. Would this issue with pygame explain why .py files fail to execute when I drop them onto the Kivy icon?

Was it helpful?

Solution

Kivy.app and all the dependencies included in it is compiled with and for Python 2.7. You cannot use it for 3.3.

If you want to try Kivy with 3.3, you also need to compile Kivy yourself :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top