English 中文(简体)
运行 python 是一个32 位进程, 在 Mac OS X 狮子的 Eclipse PyDev 中运行 python 。
原标题:Run python as a 32-bit process in Eclipse PyDev on Mac OS X Lion

我用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

然后我就可以成功运行 "pyglet "Hello World"程序

但是,我喜欢在埃克利普斯使用 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位处理程序运行?

最佳回答

我认为最好的办法是安装一个Python,它只有32位,而不是使用系统中安装的Python。

或者如果你真的想使用这个系统,你可以看看:

问题回答

暂无回答




相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签