Robin's Blog

Using PyDev with with the Enthought Python Distribution

I have recently discovered PyDev – a Python IDE which runs within Eclipse. Although I’d given up on big all-singing, all-dancing IDEs a few years ago I’m really liking it. The Ctrl-Space completion is very handy, as are the number of refactorings that are available from the menus.

Anyway, I use the Enthought Python Distribution (EPD) on my Mac, as it provides Python with a number of important scientific libraries (NumPy, SciPy, Matplotlib etc) in an easy-to-install package for OS X. It’s really handy – and is free for academic use. The only problem with using EPD is that applications can sometimes get confused between EPD and the Apple-provided version of Python.

It turns out that PyDev is one of those applications. If you follow the PyDev installation instructions, it suggests you click the Auto Config button to configure your Python interpreter. This will not work for EPD! Instead, (after deleting the interpreter you have configured already, if you’ve already configured one), click the New button and then fill in the fields as below:

Interpreter Name: This is just a name to refer to the interpreter by – it can be anything you like. I tend to use EPDPython.

Interpreter Path: You’ll need to find the python executable provided by EPD. This is normally located somewhere like:

/Library/Frameworks/EPD.framework/Versions/6.2/bin/python

The best way to find it is to navigate from /Library down the path, choosing the most sensible folder at each stage. When you get to the Versions folder, make sure you choose the latest version (highest number) folder, and then choose the bin directory and then the python executable. Once this is done, PyDev will automatically find the relevant folders to add to your PYTHONPATH, and everything will be working.


Categorised as: Computing, OSX, Python


Leave a Reply

Your email address will not be published.