关于vscode在切换andconda虚拟环境时,出现一下问题的解决办法

关于vscode在切换andconda虚拟环境时,出现一下问题的解决办法

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If using 'conda activate' from a batch script, change your
invocation to 'CALL conda.bat activate'.

  1. 打开设置 搜索终端
  2. 在终端中找到 Terminal › Integrated › Profiles: Window。

Alt text

然后点击 edit in setting.json,如图

Alt text

在terminal.integrated.profiles.windows的上面加上 "terminal.integrated.defaultProfile.windows": "Command Prompt"

Alt text

保存后就可以在 vscode 右下角切换环境了

Alt text

posted @ 2023-11-23 23:58  玩意  阅读(387)  评论(0)    收藏  举报