Fix - zsh: command not found: conda [macOS]


% conda
zsh: command not found: conda

If you are getting the above error message on macOS Terminal after you try conda command, there found the below reasons,

  1. conda package has not been installed on your device.
  2. conda has been installed but the path is not set.
zsh: command not found: conda
Solutions:

Download and install conda from its website for macOS:

Anaconda: https://www.anaconda.com/download/

Miniconda: https://conda.io/miniconda.html

This should add the environment path to the zshrc profile

If conda is already installed make sure you add its path to the environment variable in the zsh profile file:

  1. Open Zsh profile file: nano ~/.zshrc
  2. Add the line at the bottom of the file:
    export PATH ="/Users/c2c/anaconda/bin:$PATH"
  3. Save the file.
  4. Apply the changes: source ~/.zshrc

You can check if the changes got done properly by running the command conda --version if you do not get the error again and you see the version displayed that you are good to go!

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap