Deng-shun Chen
1 min readJan 27, 2021

I recently installed Anaconda3 on my Macbook Air, with the intention of working with Jupyter Notebook.

Everything seemed to work fine with bash on Terminal, but ZSH on iTerm2 could not find the jupyter notebook command.

It looks like there is some additional configuration that you need to do to get it to work. Here it is…

Open the .bash_profile file using:

open ~/.bash_profile

There’s a block of code the anaconda installer added to the end of the file. Copy that.

Mine looks something like this:

# added by Anaconda3 5.3.0 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/anaconda3/etc/profile.d/conda.sh" ]; then
. "/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<

Now open your .zshrc file:

open ~/.zshrc

Paste the copied code to the end of the file and save it.

Now do a iTerm restart or:

source ~/.zshrc

It should work now. :)