天天看點

vscode 終端添加Anaconda Powershell Promp

作者:技術瘾君子

前言:Anaconda 安裝文檔https://anaconda.org.cn/anaconda/install/

注意:Anaconda官方建議不要将 Anaconda 添加到 PATH 環境變量中,因為這會幹擾其他軟體

1、在檔案設定裡面搜尋 terminal.integrated.profiles.windows

vscode 終端添加Anaconda Powershell Promp

點選setting.json

2、編輯配置

"conda powershell terminal":{
            "source": "PowerShell",
            "args":"-ExecutionPolicy ByPass -NoExit -Command & 'd:\\ProgramData\\anaconda3\\shell\\condabin\\conda-hook.ps1' ; conda activate 'd:\\ProgramData\\anaconda3'", 
            "title":"conda powershell terminal",
        },           
vscode 終端添加Anaconda Powershell Promp

3、編輯資訊如何查找

vscode 終端添加Anaconda Powershell Promp

如上圖所示,打開位置,

vscode 終端添加Anaconda Powershell Promp

把相對應的資訊填寫上去,然後重新開機vscode

vscode 終端添加Anaconda Powershell Promp

這樣就證明已經配置好了