简体   繁体   English

如何使用virtualenv来评估Light Table中的Python?

[英]How do I use a virtualenv to evaluate Python in Light Table?

How do I use a virtualenv to evaluate Python in the Light Table IDE ? 如何在Light Table IDE中使用virtualenv来评估Python?

I run all my projects under virtualenvs, and all the virtualenvs are located in subfolders within /.virtualenvs/ (very standard practice) 我在virtualenvs下运行我的所有项目,并且所有virtualenvs都位于/.virtualenvs/中的子文件夹中(非常标准的做法)

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? 我看到LightTable支持每个工作区设置的行为,那么有没有办法设置一个将工作区绑定到特定virtualenv路径的行为?

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. 我不使用LightTable,但是如果你能告诉它在virtualenv的bin目录中使用python可执行文件,那应该可行。 That's how virtualenv works. 这就是virtualenv的工作方式。 The python executable traverses up through the virtualenv's directory structure until it finds a lib dir with the appropriate content. python可执行文件遍历virtualenv的目录结构,直到找到具有适当内容的lib目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM