[Fixed] zsh: Command Not Found Conda: Best Explanation

Author: Amresh Mishra | Published On: March 14, 2024

What is ZSH?

ZSH, broadens the usefulness of the Bourne Shell (sh), offering fresher elements and more help for modules and topics. Beginning with MacOS Catalina in 2019, Zsh turned into the default login and intelligent shell in Mac machines. It is also known as the Z shell.

Many users are complaining that they are facing an error when they are trying to run Conda on their device/ system. If you are also facing such type of error then definitely this guide is going to be beneficial for you, just go through the following instructions and execute the instructions step by step on your system and that will fix these errors.

[Fixed] zsh: Command Not Found Conda: Best Explanation

While collaborating with python, we frequently utilize virtual conditions/environments to keep up with our project/venture or application. In many cases, commonly we ran into certain mistakes along these lines. It is possible that we got the blunder for module establishment, import, or because of missing records or files. Today in this post, we will talk about such type of issue and try to find some effective solutions, i.e., zsh: command not found conda.

What is Conda?

Conda is a command-line utility as well as an open-source package management framework, or a package manager, for Windows, Linux, and Mac. It can basically introduce, design, and update packages, as well as their conditions, on your machines. It can likewise swiftly swap between various conditions or different environments. It was planned in view of Python, despite the fact that it can introduce and deal with the software packages for any programming language.

Causes for zsh: Command Not Found :

There might be many reasons to get the error but in this case, there is two cases for the occurrence of this error. The first is that conda isn’t installed in your device, so the system can’t find it. The subsequent explanation may be that the conda is installed in the system yet neglects to find the conda on account of the inaccurate way determined.

What is the zsh: command not found conda error?

The zsh command not found error arises by the shell when our framework can’t track down the ideal document. On account of the conda climate, the framework raises the zsh command not found conda, and that implies that the framework can’t bring the conda file, and thus the mistake is raised.

Related : In Node.js, Import ES6 modules in CommonJS code, and more – UPDATED by using Dynamic import

How To Fix conda: command not found Error

To Fix the conda command error: That is a command not found Error You simply need to add the conda catalog to the zsh shell PATH environment variable. Simply utilize this order to add climate PATH. export PATH=”/anaconda3/bin”:$PATH. Then, at that point, simply attempt this order to check whether PATH is added or not. conda – version. The second arrangement is Just to ensure which terminal are you utilizing. On the off chance that you have added PATH in your zsh and You are trying to use it in bash then you will confront not tracked down blunder. Simply Type slam in the terminal to guarantee you are in slam and afterward attempt: conda -version.

Few methods are listed below follow the listed instruction and fix this annoying error-

  1. If conda is not installed properly on the system.
  2. If the path to conda is not specified.
  3. Add the conda directory to the zsh shell PATH environment variable.
  4. Make sure you are in bash or zshrc.

1] If conda is not installed properly on the system

The arrangement is that you really want to install Anaconda in your device for the given explanation because in many cases this is common that on your system conda application are not pre-installed in this case you need to introduce the conda on your respected system. You can follow this connection to download it.

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

2] If the path to conda is not specified

In many cases, it might likewise happen that regardless of whether Anaconda is introduced in your device and you can get the blunder then, you ought to indicate the way in .zshrc the file as a record. To add the way in that file, you ought to initially open the .zshrc files and afterward copy and paste the following command there-

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

After executing the above command again execute the following command to check it-

source ~/.zshrc
echo $HOME
echo $PATH

I Hope, the above execution is fixes this annoying error. Still, you are facing this error move to another method.

3] Add The Conda Directory To The zsh Shell PATH Environment Variable

For using solving this error you just need to add the conda directory to the zsh shell PATH environment variable. Simply utilize this order to add climate PATH.

export PATH="/anaconda3/bin":$PATH

Then attempt this order to check PATH was added or not.

conda --version

If still you are facing an error move to the next solution.

4] Make sure you are in bast or zshrc.

Simply ensure which terminal are you utilizing. On the off chance that you have added PATH in your zsh and You are trying to use it in slam then you will confront a not tracked down error.

  • Open the terminal.
  • Type bash in the terminal (to guarantee you are in slam and afterward attempt): 
conda --version

I hope, this post is beneficial for you, if you are followed the above instructions step by step and execute it then the error is must get solved. By any chance. If still, you are facing this error then let us know in the comment section.

Author: Amresh Mishra
Amresh Mishra is a passionate coder and technology enthusiast dedicated to exploring the vast world of programming. With a keen interest in web development, software engineering, and emerging technologies, Amresh is on a mission to share his knowledge and experience with fellow enthusiasts through his website, CodersCanteen.com.

Leave a Comment