I installed Anaconda Python on my Mac today and following line was added to .bash_profile by Anaconda. Since I am using zsh so I moved this line to .zshrc. However, it doesn't work properly even if I source .zshrc in iTerm.

export PATH="/Users/shawn/Softfolder/anaconda/anaconda/bin:$PATH"

If I move that line to .bash_profile and source it, Anaconda works as expected.

I am wondering does Anaconda work in that way or I did something wrong? Many thanks!

More: I found following line in .zshrc below the line I added for anaconda. Is this line overridden the path for anaconda?

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin"

PS: I used

bash -l

to start a login session of bash then anaconda does work.

  • What does echo $PATH give you? – Qudit May 2 '15 at 0:22
  • Also, you should use .zshenv for environment variables. – Qudit May 2 '15 at 0:22
  • @Qudit it gives "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin" – Young May 2 '15 at 15:18

anaconda USES BASH so short of you running

sudo chsh -s /usr/bin/zsh $username

FIRST it will not look in ~/.zshrc as zsh is installed but not running

  • Thanks. I started a bash login session and it works. May I know how the chsh works in your answer? It runs the zsh session? – Young May 2 '15 at 15:21

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.