Zsh: Conda/Pip installs command not found

后端 未结 21 1943
忘掉有多难
忘掉有多难 2020-12-02 05:27

So I installed Anaconda and everything is working. After I installed it I decided to switch to oh-my-zsh. I am now getting:

zsh         


        
21条回答
  •  生来不讨喜
    2020-12-02 06:05

    You should do the following:
    1. /home/$USER/anaconda/bin/conda init zsh (or /home/$USER/miniconda3/bin/conda init zsh if you use miniconda)
    2. source ~/.zshrc (or just reopen terminal)

    Why this answer is better than others?

    • You shouldn't reinvent the wheel: there is already command in conda to activate, all you need to do is to call conda with full path
    • Maybe ~/.bash_profile doesn't exist (my case, only ~/.bashrc)
    • You can have bash-specific config inside ~/.bash_profile
    • You don't need manually paste and export any pathes

提交回复
热议问题