How do I use a virtualenv to evaluate Python in Light Table?
Asked Answered
L

1

13

How do I use a virtualenv to evaluate Python in the Light Table IDE?

I run all my projects under virtualenvs, and all the virtualenvs are located in subfolders within /.virtualenvs/(very standard practice)

I see that LightTable supports behaviors on a per-workspace setting, so is there some way to set a behavior that ties a workspace to a particular virtualenv path?

Lunate answered 8/1, 2014 at 23:5 Comment(9)
Looks like support isn't great. Looks like LT forces automatic interpreter detection on you, so you can't really configure clients/connections manually like you should be able to. groups.google.com/forum/#!topic/light-table-discussion/… github.com/LightTable/LightTable/issues/465Speechless
Thanks @SilasRay - I left a comment on the github issue and based on replies, it sounds like there might be a way, but the syntax is currently undocumented.Lunate
Did you try just activate your virtual environment as usual and start LightTable from it?Quean
Yes you can do that, but I'd much rather just be able to specify a virtualenv in the settings for a given workspace.Lunate
There's a new issue on Github related to this. github.com/LightTable/Python/issues/6 The best workaround seems to be the activate-then-launch method Alex mentioned above.Ungracious
The activate then launch method doesn't work if you want to use multiple projects with different virtual envs though,Cropper
Is this relevant? github.com/LightTable/LightTable/issues/465Handbarrow
@Handbarrow that issue just links to github.com/LightTable/Python/issues/6 as mentioned in a previous comment...Lunate
Unfortunately, nothing as of yet.Preston
R
2

I don't use LightTable, but if you can tell it to use the python executable in the virtualenv's bin directory, that should work. That's how virtualenv works. The python executable traverses up through the virtualenv's directory structure until it finds a lib dir with the appropriate content.

Rasbora answered 13/10, 2014 at 5:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.