Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question

closed as off topic by Tetrad Mar 13 '12 at 7:16

Questions on Game Development Stack Exchange are expected to relate to game development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Have you tried Googling the issue? One of the top results is this question and answer. –  Jim Mar 13 '12 at 3:22

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer

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