vsCode中conda activate失败的解决办法

首先贴上报错信息

无法加载文件 C:\Users\13623\Documents\WindowsPowerShell\profile.ps1,因为在此系统上禁止运行脚本。
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'.

To initialize your shell, run

    $ conda init 

Currently supported shells are:
  - bash
  - cmd.exe
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell

See 'conda init --help' for more information and options.

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

我们在开始菜单右键打开Windows powershell(管理员),输入以下

set-ExecutionPolicy RemoteSigned

vsCode中conda activate失败的解决办法_第1张图片

输入Y之后 ,重启vsCode即可,可以看到在终端的coda activate base已经可以启动。

vsCode中conda activate失败的解决办法_第2张图片

 

你可能感兴趣的:(python)