When I installed pygame and tried to run import pygame, I got this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/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): no suitable image found.  Did find:
    /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so: no matching architecture in universal wrapper

Any idea on how to fix it?


I'm assuming you're on a Mac? The last bit of that error message: "no matching architecture in universal wrapper" is a clue that there is a 32-bit vs. 64-bit conflict.

I'll refer you to this post from not that long ago. That person had the exact same problem as you. One of the answerers was able to fix it.


Not the answer you're looking for? Browse other questions tagged or ask your own question.