List of content you will read in this article:
Conda is a package management system for multiple Operating Systems. It is installed automatically with Anaconda. However, if your terminal still gives you the Conda command not found error, you can follow this article to resolve this error. Let's get started!
What is Conda? [Definition]
Conda is a command-line utility and an open-source package management system, or a package manager, for Windows, Linux, and Mac. It can simply install, configure, and update packages and their dependencies on your machines. It can also swiftly swap between different environments. It was designed with Python (py) in mind, although it can install and manage software packages for any programming language.
🌟 Unlock Your Conda Potential! 🌟
📄 Get the Complete Conda Commands Cheat Sheet Now!
Dive deeper into the world of Conda with our comprehensive cheat sheet. Perfect for beginners and experts alike, this handy guide provides quick references to essential Conda commands, tips, and tricks.
How to Fix Conda Command Not Found Error?
1. Adding to the path variable
When installed in the system, Anaconda usually adds conda to the path variable. However, if you can't find conda in the path variable, you can attempt the following solution to fix the problem.
How to fix the Conda not found error in Linux?
If you face the conda: command not found error in Ubuntu, centos, or any other Linux distribution (distro), you can follow the below-given step.
Run the following command in Linux to add Conda in the path variable:
$ export PATH=/path/to/anaconda3/bin:$PATH
The above command will only persist for the current session. To execute the command with every session, run the following command:
$ echo 'export PATH=/path/to/anaconda3/bin:$PATH' >> ~/.bashrc
How to fix Conda command not found error in Windows?
Search for 'Edit the system environment variables and click on 'Environment Variables..'
In the 'System Variables section, click on 'Path' and then click 'Edit'.
You need to add the Anaconda installation folder to the list of paths: 'C:\Users\username\Anaconda3\'.
2. Initialize conda
Run the following respective commands to initialize the conda
Initialize Conda on Linux server
$ ./anaconda3/bin/conda init
Initialize Conda on Mac OS
$ ./anaconda3/bin/conda init zsh
Initialize Conda in Windows server
$ ./anaconda3/Scripts/conda.exe init
Zsh
$ ./anaconda3/bin/conda init zsh
3. Run as administrator
You can right-click on the Anaconda Command Prompt in Windows and choose 'Run an Administrator. This is because Windows 11 releases do not presume you have administrator credentials to install or update.
Conclusion
We hope that this above-listed quick fix will help you to get rid of the Conda command not found error. We saw how to fix this error by adding conda to the path variable, initializing it, or running it as an administrator. All major operating systems are supported by the solutions discussed in this article.
Also, this article is applicable to fix bash: conda: command not found error.
I'm fascinated by the IT world and how the 1's and 0's work. While I venture into the world of Technology, I try to share what I know in the simplest way with you. Not a fan of coffee, a travel addict, and a self-accredited 'master chef'.