2017-09-24 102 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",