Setting Python Interpreter in Eclipse (Mac)

I just solved this for my Mac and it was located in

/usr/bin/python2.7

The way I found it is as follows:

(1) I tried entering the following to see if I could find where Python was located

echo $PYTHONPATH

This had the location of a custom install of Python that came from another program I downloaded, but I wanted the native Python.

(2) I wanted to see every folder in the path so I could look for python

echo $PATH

This returned the following:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/sbin

(2b) I CDed into every one of these locations and searched for python in each one.

cd /usr/bin/
ls | grep "python"

And I eventually found Python.

In Eclipse, with PyDev, if you (1) click Preferences (2) PyDev (3) Interpreter - Python, you can add the interpreter.


Running $which python should help locate your Python installation.


If you have installed python on mac, follow belows steps (on eclipse neon)

  1. Click on Preferences
  2. Search for python
  3. Below screen will appear

    enter image description here

  4. Click Choose from list enter image description here

  5. It will show up all the python installed and select one for you

Hope it helps some one. It resolve my problem.


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.