在 vscode 终端显示 conda 环境

Display conda enviroment in vscode terminal

我正在尝试在vs-code下搭建conda环境。我设置了 python interpreter and unfortunately, there is no environment indication in vscode terminal

你知道如何修复它并正确配置它吗?

谢谢。

重要的是您的环境必须先激活,然后才能使用它。如果您的终端没有显示环境前缀,只需再次尝试启动终端即可。如果您也安装了 coderunner 扩展,这尤其是一个问题。

如果这没有帮助,试试

conda init powershell

然后重启终端。

谢谢你帮助我,这里是所有过程修复:

应用命令:

conda init Powershell

然后关注 Fix Error PS1 Can Not Be Loaded Because Running Scripts Is Disabled

  1. set-ExecutionPolicy RemoteSigned -Scope CurrentUser
  2. Get-ExecutionPolicy

我在 vs-code 终端上确实有 correct output:)