Reputation: 73
I just downloaded pygame 32-bit on a 32-bit macintosh pro. I opened IDLE and typed in import pygame in IDLE shell then click enter. Usually I've heard that it should just return but it gives me the error message.
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import pygame
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
Please help me!!!
Upvotes: 2
Views: 586
Reputation: 64
I think it is because you typed py or python3 so it popped up >>> in your terminal so I would download it and do this: Make sure there is no >>> if there is the only solution I found was the restart the terminal First download it like this I will be using 3.9 for the version for example:
py -3.9 -m pip install pygame
then use this to check if it downloaded
py -3.9 -m pygame --version
Then open up IDLE - Python [VERSION] and then new file and type import pygame
and this should work!
Upvotes: 0
Reputation: 465
I can't say if this is a problem of 32/64 bits installation, but you can easily check which version you are running :
import struct; print( 8 * struct.calcsize("P"))
Upvotes: 1