How do I direct Eclipse to the Python interpreter on my Mac?
I've looked in Library which contains the directory 'Python' then '2.3' and '2.5', however they contain nothing except 'Site-packages' - Which is weird considering I can go into the terminal and type python
. I then installed the latest 2.6 version with package manager and still can't find it. Can anyone help?
Go to Window → Preferences. In the Preferences window, expand PyDev and select Interpreter-Python. Click "New..." and type Python32 for the Interpreter name. For the Interpreter executable, browse to your copy of Python (C:\Program Files\Python32\python.exe), and press Open.
You can run a Python interpreter by double-clicking on Applications / Utilities / Terminal and typing python3 (if you've installed a version of Python 3) or python (to use Python 2) in the window that opens up.
Do one of the following: Click the Python Interpreter selector and choose Add New Interpreter. Press Ctrl+Alt+S to open the project Settings/Preferences and go to Project: <project name> | Python Interpreter. Click the Add Interpreter link next to the list of the available interpreters.
An alias to the python interpreter was likely installed into /usr/local/bin
. So, to invoke python2.6, type /usr/local/bin/python2.6
or, most likely, just python2.6
. If you want python to invoke python2.6, try rearranging your $PATH
so that /usr/local/bin
precedes /usr/bin
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With