我使用 Cmder 作为命令行,并且刚刚安装了 Anaconda,我想在 Cmder 会话中使用 Conda,而不是打开 anaconda 提示符。 它不理解
conda
命令,当然,当我导航到我安装 Anaconda 的路径并尝试运行 _conda.exe acrivate base
时,给了我这个:
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 <SHELL_NAME>
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
。
之后,重新启动cmder,您应该能够在默认的cmder shell中访问
conda
。
更多细节在此: https://copyprogramming.com/howto/anaconda-python-cmder-integration-on-windows-10-2