使用Python 2.7.2。當我嘗試導入pygame時,我收到以下錯誤消息:安裝Pygame for Mac OS X 10.6.8
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
我不完全確定這是什麼意思。我應該自己編譯pygame嗎?
好吧,我改到32位,但現在它說,該模塊pygame的不存在。 – user1064913
您是否嘗試在更改架構後重新安裝PyGame?此外,您可能已經知道這一點,但通過檢查>>> help('modules')'確保您使用了正確的模塊名稱和大小寫。 –
是的,我試過重新安裝它。它不會顯示在模塊列表中。我認爲python在終端中退出python後會變回64位。有沒有辦法將其永久更改爲32位模式? – user1064913