big*_*ind 5 macos pygame importerror
我在我的mac上安装了pygames,使用pygame.org网站上的以下软件包中的安装程序:pygame-1.9.1release-python.org-32bit-py2.7-macosx10.3.dmg.
我已经在python.org上安装了Python 2.7.2 Mac OS X 64位/ 32位x86-64/i386安装程序的python,然后运行easy_install pyobjc以便我现在安装了pyobjc 2.2.
但是当我尝试在repl中导入pygame时,我得到了这个:
>>> import pygame
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
Run Code Online (Sandbox Code Playgroud)
我承认这是一个猜测,但这可能是 32 位与 64 位的问题吗?
如果我做:
file /usr/bin/python
Run Code Online (Sandbox Code Playgroud)
我得到:
python: Mach-O universal binary with 2 architectures
python (for architecture x86_64): Mach-O 64-bit executable x86_64
python (for architecture i386): Mach-O executable i386
Run Code Online (Sandbox Code Playgroud)
想知道您在加载项文件中看到了什么?
例如,如果是 32 位,则以该模式运行 Python:
arch -i386 /usr/bin/python
Run Code Online (Sandbox Code Playgroud)
如果情况并非如此,至少这将有望让您朝着正确的方向前进。
| 归档时间: |
|
| 查看次数: |
3355 次 |
| 最近记录: |