Zsh: Conda/Pip installs command not found

2019-02-01 09:01发布

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: command not found: conda

when trying to use pip or conda installs

echo $ZSH_VERSION

5.0.5

I have added to my zshenv.sh

export PATH ="/Users/Dz/anaconda/bin:$PATH"

What is it that I'm missing?

8条回答
Ridiculous、
2楼-- · 2019-02-01 09:31

It appears that my PATH is broken in my .zshrc file.

export PATH="$PATH;/Users/Dz/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/Dz/.rvm/bin"

Doh! Well that would explain everything. How did I miss that little semicolon? Changed:

export PATH="$PATH:/Users/Dz/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/Dz/.rvm/bin"

source ~/.zshrc
echo $HOME
echo $PATH

We're good now.

查看更多
小情绪 Triste *
3楼-- · 2019-02-01 09:31

The anaconda installer automatically writes the correct PATH into the ~/.bash_profile file. Copy the line to your ~/.zshrc file, source it with source ~/.zshrc and you're good to go.

查看更多
登录 后发表回答