Trouble

"zsh: command not found: conda"
after switching your default shell from -bash to -zsh.

Cause

Not specify the path of Anaconda.

Solution

Check the path of directory of the anaconda3 and then specify it.


1-1) If Anaconda3 program is installed in root directory, run

export PATH="/root/anaconda3/bin:$PATH"


1-2) If you do not know which directory the Anaconda3 is installed in, follow

(1)'Command + space' and search anaconda3 first.
(2) Right click with option key on 'bin' folder and then 'Copy "bin" as Pathname'.
(3) Specify the path by pasting the pathname.

like
export PATH="{pathname}:$PATH"

for example,
export PATH="/Users/mac/opt/anaconda3/bin:$PATH"


2) After specifying the path, run the following two codes.

% conda init zsh
% conda update -n root conda

3) Restart terminal




bonne journée.

0개의 댓글