3

As a developer that has worked on more than one python project at once, I love the idea of Virtualenv. But, I'm currently trying to get Komodo IDE to play nice with VirtualEnv on a Windows box. I've downloaded virtualenvwrapper-win and got it working (btw, you are using Virtualenv on windows you should check it out):

http://pypi.python.org/pypi/virtualenvwrapper-win

however, I can't quite figure out what I need to do to get Komodo IDE to respect it all. I found the following for Mac users:

http://blog.haydon.id.au/2010/11/taming-komodo-dragon-for-virtualenv-and.html

But, so far, no luck. I'm pretty sure that I need to set a postactivate script to set some environment variables for Komodo to pick up.

Has anyone gotten this working before?

I'm using:

Win7, Python 2.6, Komodo IDE 6.1.3

Thanks in advance!

Alojz Janez
  • 530
  • 1
  • 3
  • 13
David S
  • 12,967
  • 12
  • 55
  • 93
  • 2
    Nothing against Komodo, but have you tried PyCharm? I'm using their 2.0 preview release on Windows 7 with great success. You can alter each project's settings to point to a Python interpreter within your virtualenv. When running the project within PyCharm's console, the virtualenv is loaded and runs as expected. – Brandon Taylor Nov 21 '11 at 22:55
  • @Brandon -- I have played with PyCharm several times... most recently 1.5. It is a good IDE, and I suspect that it will end up being the best of class, but it just always feels a little "flakey" to me. I might have to check it out again after 2.0 is released. Thanks for the comment/reply – David S Nov 22 '11 at 23:20
  • 1
    The 2.0 pre-release has some issues, especially around the built-in svn client. Git works fine, but svn is busted. Occasionally it won't be able to resolve certain paths for some reason. I used to use Aptana + PyDev before, but really like PyDev now. – Brandon Taylor Nov 23 '11 at 02:05

3 Answers3

2

I finally ended up posting the same question on the ActiveState forum. The reply was that it doesn't officially support VirtualEnv, yet. But, that you can make get it to work by adjusting the paths, etc. Here is the link to the question/reply.

http://community.activestate.com/node/7499

David S
  • 12,967
  • 12
  • 55
  • 93
1

You can do this by adding the virtualenv's Python library to the project. Right-click on Project > Properties > Languages > Python > Additional Python Import Directories.

Now if someone could tell me how to add a folder like that in Mac when the virtualenv is under a hidden folder (without turning hidden folders on in Finder).

Tom
  • 22,301
  • 5
  • 63
  • 96
0

Use the context menu to setup virtualenv. Right-click on Project > Properties > Languages > Python > Additional Python Import Directories.

Use an alias in .profile to add support for rvm.

alias komodo='open -a "Komodo Edit"'

From there, type "rvm use ree( or rbx, or 1.9.1, or whichever version you want)."

Community
  • 1
  • 1
Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265