I'm still sort of new here so I hope this is ok, but anyway:
I am in the middle of a small project to try and learn a bit of basic game design using python. I have been using Pygame on the latest version of macOS Sierra (with Python 2.7 downloaded from the Python.org website) and when I try to run the code I consistently get the following error
Traceback (most recent call last):
File "Pong.py", line 8, in <module>
import pygame
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/__init__.py", line 133, in <module>
from pygame.base import *
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/pygame/__init__.py", line 95, in <module>
from pygame.base import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so, 2): Symbol not found: _SDL_EnableUNICODE
Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so
Expected in: flat namespace
in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so
I have done some research on the error and the only sites that came up with a google search seemed to be in German. I don't suppose anyone would be able to advise on why I'm getting this error with the pygame module and how to fix it? I can provide the source code if it's needed, but from my (admittedly limited) understanding the error lies in the imported pygame module?
Edit: If I remove the from pygame.base import *
from the file mentioned in the error I get the following error instead:
Traceback (most recent call last):
File "Pong.py", line 8, in <module>
import pygame
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/__init__.py", line 134, in <module>
from pygame.constants import *
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/pygame/__init__.py", line 98, in <module>
from pygame.rect import Rect
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so, 2): Symbol not found: _SDL_EnableUNICODE
Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so
Expected in: flat namespace
in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so