conda command not found after installing oh-my-zsh

conda command not found

I recently installed oh-my-zsh to avoid my mistakes I have been constantly making while using git and improve my command line interface experience.

oh-my-zsh was great but It suddenly started not recognizing conda command.

Screen Shot 2018-02-23 at 2.24.56 AM

Naturally, I got a problem with using conda virtual environment.

Screen Shot 2018-02-23 at 2.17.32 AM

Add Path to ~/.zshrc file

It seems like this new theme in zsh does not have path to conda so does not know where to look when conda command comes. As suggested here, I found the right path from .bash_profile and pasted it to .zshrc file.

So first, open your .bash_profile file by running following command.

open ~/.bash_profile

You will see the PATH automatically added by Miniconda in my case. If you installed Anaconda, you will see Anaconda instead. Copy this two lines.

# added by Miniconda3 installer
export PATH="/Users/mkang/miniconda3/bin:$PATH"

Go back to the terminal and open .zshrc file via vim and paste the above lines somewhere.

vim ~/.zshrc

source the file or open a new terminal to make the change in effect.

source ~/.zshrc

Now zsh understands conda command!

Screen Shot 2018-02-23 at 2.43.36 AM

2 thoughts on “conda command not found after installing oh-my-zsh

  1. for some reason its not working for me. I added the lines in zshrc and executed succesfully the source command but i still get and error when i try to do “jupyter notebook”


  2. Hi Carlos! Did you get Jupyter Notebook through Anaconda, not pip? And were you able to do ‘conda list’ after updating zshrc file, or you still get an error for ‘conda list’ as well?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s