我用MacPorts在Mac OS X 10.7.4上安装了皮格莱特。
pyglet 只有在建造32位拱门时才起作用, 因此,为了使用它,我必须运行 python 从这样的命令行,
arch -i386 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python
然后我就可以成功运行 "
但是,我喜欢在埃克利普斯使用 PyDev, 但我无法找到如何配置 PyDev 来运行 python 。
我加了麦克波特斯皮顿
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python
作为 Python 解译器 (Prefers & gt; Pydev & gt; 解释器 - Python) 。 我创建了一个新项目, 并将MacPorts python 设置为项目解译器 。 但当我运行 < a href=\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
pydev debugger: starting
Traceback (most recent call last):
File "/Applications/eclipse/plugins/org.python.pydev.debug_1.6.2.2010090812/pysrc/pydevd.py", line 1145, in <module>
debugger.run(setup[ file ], None, None)
File "/Applications/eclipse/plugins/org.python.pydev.debug_1.6.2.2010090812/pysrc/pydevd.py", line 916, in run
execfile(file, globals, locals) #execute the script
File "/Users/andrewfogg/Dropbox/EnvironmentalArt/src/art.py", line 2, in <module>
window = pyglet.window.Window()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyglet/__init__.py", line 306, in __getattr__
__import__(import_name)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyglet/window/__init__.py", line 1669, in <module>
from pyglet.window.carbon import CarbonPlatform, CarbonWindow
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyglet/window/carbon/__init__.py", line 69, in <module>
framework= /System/Library/Frameworks/QuickTime.framework )
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyglet/lib.py", line 90, in load_library
return self.load_framework(kwargs[ framework ])
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyglet/lib.py", line 226, in load_framework
lib = ctypes.cdll.LoadLibrary(realpath)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ctypes/__init__.py", line 431, in LoadLibrary
return self._dlltype(name)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ctypes/__init__.py", line 353, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/System/Library/Frameworks/QuickTime.framework/QuickTime, 6): no suitable image found. Did find:
/System/Library/Frameworks/QuickTime.framework/QuickTime: mach-o, but wrong architecture
/System/Library/Frameworks/QuickTime.framework/QuickTime: mach-o, but wrong architecture
这表明 PyDev 正在以 64 位进程运行 python 。
我可以看到我的 Python 口译员设置环境变量( Previews & gt; Pydev & gt; 解释器 - Python & gt; 环境), 但我不确定如何正确配置此选项( 我已经尝试过 ) 。
问题是:在PyDev,我如何将python作为32位处理程序运行?