visual studio code的终端命令窗口替换成conda的环境
作者:互联网
1.打开visual studio,点击File->Preferences→Settings,找到Features下面的Terminal,点Edit in settings.json
2.找到 Anaconda Prompt文件所在位置,鼠标右键查看属性,将目标中的值复制出来
我的是%windir%\System32\cmd.exe "/K" E:\Miniconda2\Scripts\activate.bat E:\Miniconda2
将"/K"和 E:\Miniconda2\Scripts\activate.bat E:\Miniconda2复制到terminal.integrated.shellArgs.windows
3.将示例中对应的值修改好之后赋值到settings.json
示例如下:
{ "python.pythonPath": "E:\\Miniconda2\\envs\\python36_test\\python.exe", //选择默认使用的Python环境,可以不写 "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe", "terminal.integrated.shellArgs.windows": [ "/K", "E:\\Miniconda2\\Scripts\\activate.bat E:\\Miniconda2" ] }
标签:bat,code,替换成,terminal,visual,activate,Miniconda2,Scripts,integrated 来源: https://www.cnblogs.com/7047-zfy/p/12625071.html