I installed Kivy on my Mac. OS X comes with Python 2.7. I wanted to use the Python 3 enumeration function, so I installed Python 3.4. After a long search and hair removal, I pointed to this line.
exec $(python -c "import os, sys; print os.path.normpath(sys.prefix)")/bin/python2.7 "$@"
in the file /Applications/Kivy.app/Contents/Resources/ script. I changed it to:
exec /Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 "$@"
hoping to get Kivy to use Python 3.4.
Now I get this error:
Traceback (most recent call last):
File "main.py", line 1, in <module>
from kivy.app import App
File "/Applications/Kivy.app/Contents/Resources/kivy/kivy/app.py", line 321, in <module>
from kivy.base import runTouchApp, stopTouchApp
File "/Applications/Kivy.app/Contents/Resources/kivy/kivy/base.py", line 29, in <module>
from kivy.event import EventDispatcher
File "/Applications/Kivy.app/Contents/Resources/kivy/kivy/event.py", line 8, in <module>
import kivy._event
ImportError: dlopen(/Applications/Kivy.app/Contents/Resources/kivy/kivy/_event.so, 2): Symbol not found: _PyString_Type
Referenced from: /Applications/Kivy.app/Contents/Resources/kivy/kivy/_event.so
Expected in: flat namespace
in /Applications/Kivy.app/Contents/Resources/kivy/kivy/_event.so
Can someone help me fix this error? Or is there a better way to get Kivy to use Python 3.4?
I installed Kivy 1.8.0.
I run the application from the terminal, for example
kivy main.py
source
share