I have been trying to use Eclipse 3.6 as a Python editor. I install the latest version of PyDev, and then try to set the Interpreter - Python field of the preferences, on my ma
Had the same problem. Eclipse wouldn't find all the required path using the default installed python (2.6). I downloaded python 2.7, went through the install. My new "which python" path became:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python.
When I tried to set up the interpreter this time, specified this path and it went right through.
Note:
/Library/Frameworks/Python.framework/Versions/2.7/bin
directoryPyDev needs the location of the python lib folder to get this directory location on your computer try running this command in the terminal.
python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
And add that directory to your PYTHONPATH location in PyDev in Eclipse.
In Preferences > PyDev > Interpreter - Python
it then auto-configs some paths, select them, and it proceeds.
I decided to leave my MAC OS Python 2.7 as is, and instead just install Python 3.3.4. It works smoothly! :)
1) download python 3.3.4:
The python-3.3.4-macosx10.6.dmg is from http://python.org/download/releases/3.3.4/: downloaded "from Mac OS X 64-bit/32-bit Installer (3.3.4) for Mac OS X 10.6 and later" (My Mac OS is Mountain Lion).
2) setup Python Interpreter and Lib:
Go to Eclipse Preferences > Interpreter > Python Interpreter and click "Quick Auto Config". It is able to locate the Python 3.3.4, find the interpreter as /usr/local/bin/python3 (which is actually: shulow$ ls -l /usr/local/bin/python3 lrwxr-xr-x 1 root wheel 69 4 Mar 23:18 /usr/local/bin/python3 -> ../../../Library/Frameworks/Python.framework/Versions/3.3/bin/python3)
And it also automatically find the respective libraries in /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3 which has the .py files (rather than only the .pyc and .pyo)
For OS X 10.8 (Mountain Lion) I found a solution here: pydev debugger: unable to find real location for python 2.7 after OS 10.8 upgrade
Seems that there are no command line tools installed by default, so you have to go download them...
After installing Apple's OSX Developer tools from http://developer.apple.com/xcode/, the necessary .py files will be installed in /library/python/2.6/site-packages. No need to fuss with installing python yourself of using versions of Python not blessed by Apple.