其他分享
首页 > 其他分享> > vscode 无法使用 GitBash 激活 conda 虚拟环境

vscode 无法使用 GitBash 激活 conda 虚拟环境

作者:互联网

Error:

IMPORTANT: You may need to close and restart your shell after running 'conda init'.

解决方案,直接上配置文件:

"terminal.integrated.profiles.windows": {
    "PowerShell": {
      "source": "PowerShell",
      "args": ["-nolog"]
    },
    "GitBash": {
      "path": ["E:\\dev\\envs\\Git\\bin\\bash.exe"],
      "args": ["--login", "-i"]
    }
  },
  "terminal.integrated.defaultProfile.windows": "GitBash",

修改的地方在:GitBash 配置项中的 args 参数中,添加启动参数 --login 这一个即可起作用了!最终效果:
最终效果图

参考链接:https://achuan-2.github.io/posts/be43.html

标签:vscode,args,integrated,terminal,windows,虚拟环境,conda,GitBash
来源: https://blog.csdn.net/qq_40750972/article/details/123605334