Reputation: 45
I am running OSX Lion and have installed python2.7 from python.org (this distribution can run in both 64bit and 32bit mode). I have also installed the wxPython package. I can run python scripts that import wxPython from the Terminal by explicitly using the 32-bit version. I would like to run the same scripts in Eclipse, but cannot. I configure PyDev to use python.org's interpreter, but it defaults to 64-bit (I check this by printing sys.maxint). I cannot figure out how to make PyDev use the 32-bit interpreter. I have tried configuring the PyDev python interpreter to point to:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-32
but it ends up using:
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
How can I configure PyDev to use the 32-bit python interpreter in Eclipse on OSX Lion?
I appreciate any input regarding this matter. Thank you.
Upvotes: 3
Views: 1955
Reputation: 25342
The interpreter used in PyDev is computed from sys.executable...
Now, a doubt: if you start a shell with /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-32 and do 'print sys.executable', which executable appears?
Now, onto a workaround... you can try replacing the places where sys.executable appears in plugins/org.python.pydev/PySrc/interpreterInfo.py to point to '/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-32'
That's the script where it decides which interpreter to actually use... (still, it's strange that sys.executable would point to a different location...)
Upvotes: 2