今天想要在Mac上执行一段自动启动jupyter的shell脚本,但是出现了错误
错误代码:
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- 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'.
解决方案:
在shell中插入如下代码:
source ~/anaconda3/etc/profile.d/conda.sh
其中~为anaconda路径
然后即可执行:
conda activate base