Error:

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

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

"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

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐