views:

1970

answers:

5

Does anybody have directions for getting Eclipse (Galileo), PyDev, and Virtualenv working together? I'm specifically trying to run Pinax but any instructions are fine.

I thought I had it (and even blogged everything but the final step - interactive debugging) and still there is no solution. I'm specifically on OS X but any answer should be sufficient. This is the best resource I've found so far:

http://blog.vlku.com/index.php/2009/06/10/djangoeclipse-with-code-complete-screencast/

+10  A: 

What problems are you having? The key is having separate workspaces for each project. Then select the python interpreter for that workspace to the one created for the virtualenv. Then you should be set.

DrBloodmoney
Ahh, that's a good idea. I just got swamped right now and can't confirm it - hopefully tonight.
Adam Nelson
+3  A: 

Based on the information here (and others found when I was trying to solve the same problem you had), I put together a post with step-by-step instructions here.

The short answer, as the Doctor says, is to make each virtualenv correspond to a workspace - so when you create a new one of the former, you create a new one of the latter exclusively to use with it.

Dan
+4  A: 

I'd disagree with having to go through all the hassle of creating and maintaining a separate workspace for every virtual environment.

All you'd need to do is set up a separate interpreter per virtualenv and make sure the respected project is using it.

Along with your standard interpreters such as Python 2.5, Python 2.6, Python 3.1 you'll also add some more along the lines My Django Website, My Cool Project, My Other Cool Project--where each interpreter will have all the PYTHONPATH entries as it's virtualenv would provide.

kRON
I just moved to TextMate and said good bye to Eclipse. Any thoughts on whether Eclipse is worth it if set up properly?
Adam Nelson
Some people love that one tool can satisfy and facilitate all their work, other people become overwhelmed or feel bloated by so many possibilities, much of which they feel they've no interest to. You should really try investing a good week into it and see if it could work back for you.
kRON
A: 

Not sure about Galileo since I have upgraded to Helios.

It's easy to setup Project->PyDev - Interpreter/Grammar -> Interpreter based on different projects. When configure the interpreter to point to virtualenv's python interpreter, Pydev doesn't automatically inherit the system python's path, therefore it's the user's duty to select appropriate PYTHONPATH. But you can always go back to edit that in Preferences->Pydev->Interperter - Python -> Libraries tab.

Dingle