vscode启动时终端显示:

    1. CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
    2. To initialize your shell, run
    3. $ conda init
    4. Currently supported shells are:
    5. - bash
    6. - fish
    7. - tcsh
    8. - xonsh
    9. - zsh
    10. - powershell
    11. See 'conda init --help' for more information and options.
    12. IMPORTANT: You may need to close and restart your shell after running 'conda init'.

    我的linux系统上安装了anaconda, 根据上述提示,执行: conda init bash。

    重启vscode,发现依旧提示该问题。

    突然想到,.bashrc中配置过conda activate dl类似的配置conda默认启动环境的,是不是.bashrc有问题呢。

    执行source .bashrc, 提示python路径不存在,修改环境变量为正确的路径后,重新source .bashrc, 重启vscode, 不再提示该问题。问题解决。