conda activateのエラーをconda initで解決する
conda activateを実行した際に、以下のようなエラーが出る場合があります。
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
– powershellSee ‘conda init –help’ for more information and options.
IMPORTANT: You may need to close and restart your shell after running ‘conda init’.
この対処法は、まず、ご自身が使っておられるシェルを確認します。
echo $SHELL
この返答が、
/bin/zshならzshを、
/bin/bashならbashを使っているはずです。
そこで、ご自身のシェルに応じて、
conda init zsh
もしくは
conda init bash
もしくは
conda init bash
と入力します。
その後、terminalを再起動すれば問題が解決するはずです。
コメント