If this problem occurs on a mac, then type the following commands:
source <path to conda>/bin/activate
conda init zsh
This will modify your zshrc accordingly (or create it if it does not exist).
This solution comes from the official anaconda doc.