解决conda激活环境 IMPORTANT: You may need to close and restart your shell after running ‘conda init‘.

conda激活环境报错

解决IMPORTANT: You may need to close and restart your shell after running ‘conda init’.

激活conda环境

conda activate py37

报错信息

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'.

在命令行运行

conda init cmd.exe
conda init powershell

运行完成后,重启CMD命令行,激活Python环境即可解决。

你可能感兴趣的:(Python安装报错,conda,python,windows)