2017-09-24 96 views
1

我喜欢为Sublime文本3上的Python配置第二个构建系统。默认情况下,它使用Python 2.7。目前,如果我想使用Python 3.5,我执行activate py35,它的功能就像一个魅力。崇高的文本:如何通过构建系统激活conda environnement

这是我原来的编译系统:

{ 
    "cmd": ["start", "cmd", "/k", "python", "-u", "-i", "$file"], 
    "selector": "source.python", 
    "shell": true, 
    "working_dir": "$file_dir" 
} 

我加入这行之前:

"cmd": ["activate", "py35"], 

我发现this question但它并没有帮助,which命令不被认可,即使我的env被激活:

enter image description here

+1

'which'是Unix命令。 https://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-the-windows-command-line –

+0

国际海事组织,更优雅的方法是将'python'添加到PATH环境变量。 Windows的Python安装程序有一个选项,但默认情况下它未被选中。 – idleberg

回答

0

您不能再添加其他"cmd"。 JSON不允许重复键。

你也不需要激活任何东西。得到的完整路径Python的可执行

例如

"cmd": ["start", "cmd", "/k", "C:/Users/name/path/py35/Scripts/python",