views:

903

answers:

2

I downloaded Pydev plugin for Eclipse (3.5.2) today on Mac OSX 10.5.8. To be able to use Pydev, I need to configure the interpreter in Eclipse. I am not clear what exactly I need to do here, or what this step does. I want to make sure that when I run programs from Eclipse using Pydev, it uses the Enthought Python Distribution (EPD) I have installed, and can use all the packages that come with EPD. Can someone please tell me simple steps that I need to follow.

If I click on autoconfig, it shows a bunch of folders with the path

/System/Library/Frameworks/Python.Framework/Versions/2.5/...

But I know that the Python that came with EPD is version 2.6.4, so autoconfig is not choosing EPD.

Thanks for any help.


UPDATE - solution

If anyone else is interested in learning how to do this, see the first link in the answer by mlvljr below. Use the solution there EXCEPT that as suggested in the solution, Shift+Cmd+G, did not help me see inside the Python.app package. To look inside it, use the "gear" drop down menu in the Finder and choose "Show Package Contents"

+1  A: 

At least on Windows, this seems to doable via:

  1. [Navigate Eclipse menus] "Window"->"Preferences"->"PyDev"->"Interpreter - Python"-> "New" (which is next to "Auto Config" you tried to use, if I get it right)

  2. [Type or paste into textboxes] "Interpreter Name", "Interpreter Executable"

  3. Click "OK" :))

[UPDATE]

From the Enthought Python Distribution Readme.txt (EPD.mkpg/Contents/Resources/Readme.txt in epd-6.1-1-macosx-i386.dmg EPD disk 32-bit MacOS disk image):

Applications are installed into /Applications/EPD32-6.1
and the underlying Python framework into /Library/Frameworks/Python.framework/Versions/6.1

So, Interpreter Executable must be:

/Library/Frameworks/Python.framework/Versions/6.1/python

You can supply (almost) any Interpreter Name you like. :)

Hope this helps.

[EDIT]

If this does not help, google search for “Error getting info on interpreter” gives the following (the problem may have to do with Eclipse version (older have bugs) and the symlink vs actual path problem):

  1. Installing PyDev on OS X 10.5.2

  2. [Pydev-users] [pydev - Users] mayapy on PyDev Maya Python is running on OSX

  3. Cannot set python interperter in preferences - ID: 1523582 (unfold "comments" there)

mlvljr
The problem is that I do not know what the "Interpreter Name" is and what the "Interpreter Executable" is and where to find it. Thanks anyway.
Curious2learn
@Curious2learn: The interpreter executable seems to be around `/Library/Frameworks/Python.framework/Versions/6.1` (see http://cse.ucdavis.edu/~chaos/courses/nlp/Software/PythonOSXInstall.html for details, `What went where` part), you can supply any `Interpreter Name` you like ("EPD 2.6.4", for example), if I get it right.
mlvljr
Thanks so much for the update. I tried doing that, but I got an error saying:"Error getting info on the interpreter". When I looked in the error log, there was the following line there:"No output was in the standard output when trying to create the interpreter info"Hope we can fix this. Because, as of now I cannot run programs that import matplotlib.
Curious2learn
Thanks so much, mlvljr. I had searched for the term “Error getting info on interpreter” on google and did come across the first link in your list. The problem was that it did not give the path the EPD interpreter. I was not sure that inside Python.app they would have the same path. And, I did not know how to look inside Python.app (Cmd+Shift+G did not help). So I looked up on the web and learnt that I could use the "gear" icon in the finder to look inside the python.app and figure out the path. I did that and it works great now. Thanks for your help.
Curious2learn
@Curious2learn Happy, your problem is over. Thanks for accepting too :))
mlvljr
+1  A: 

Mac OS 10.6.4:

Selecting the interpreter as /Library/Frameworks/Python.framework/Versions/2.7/Python did not work.

I had to select /Library/Frameworks/Python.framework/Versions/2.7/bin/python

justus87