Fix: ‘conda’ is not recognized as an internal or external command, operable program or batch file5 min readReading Time: 4 minutes
If you’re seeing the ‘conda’ is not recognized as an internal or external command, operable program or batch file error when trying to run Conda commands, don’t worry. This is a common problem that can be easily fixed. Here’s what you need to do.
If you receive the error message ‘conda’ is not recognized as an internal or external command, operable program or batch file, this is most likely due to one of the following reasons:
-The conda command is not installed on your system. In order to fix this, you will need to install the Anaconda distribution of Python, which can be found here: https://www.anaconda.com/distribution/
-The conda command is not added to your system PATH. This can be fixed by adding the location of your Anaconda installation to your PATH. For instructions on how to do this, please see the following link: https://docs.anaconda.com/anaconda/install/add-to-path
-You are using an older version of conda. If you are using conda version 4.6 or older, you will need to upgrade to a newer version in order to use the conda command. Instructions for doing this can be found here: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#updating-conda
Why this issue occurs and what it means
The “conda” command is not recognized as an internal or external command, operable program, or batch file because the conda.exe file is not included in the Windows PATH environment variable. The PATH environment variable is a list of directories that Windows searches for executable files (e.g., .exe, .bat, and .cmd files). Therefore, when you try to run the “conda” command, Windows looks for the conda.exe file in the directories listed in the PATH environment variable, but it cannot find the file because it is not included in the PATH.
There are two ways to fix this issue:
1. Add the conda.exe file to the Windows PATH environment variable
2. Use the full path to the conda.exe file when running the “conda” command
To add the conda.exe file to the Windows PATH environment variable:
1. Open the Control Panel.
2. Click on System.
3. Click on Advanced system settings.
4. Click on the Environment Variables button.
5. Under System Variables, click on New.
6. In the Variable name field, enter PATH.
7. In the Variable value field, enter the full path to the conda.exe file.
8. Click on OK.
9. Close the Control Panel.
After adding the conda.exe file to the Windows PATH environment variable, you should be able to run the “conda” command from any directory.
Alternatively, you can use the full path to the conda.exe file when running the “conda” command. For example, if the conda.exe file is located in the C:\Users\username\Anaconda3\ directory, you would use the following command:
How to resolve the issue so that ‘conda’ is recognized as an internal or external command
There are a few things that you can do in order to resolve the issue so that ‘conda’ is recognized as an internal or external command. One thing that you can do is to add the Anaconda directory to your PATH environment variable. This can be done by going into your environment variables and adding the following line to the PATH variable:
Another thing that you can do is to run the Anaconda Prompt as an administrator. This can be done by right-clicking on the Anaconda Prompt shortcut and selecting “Run as administrator”.
If neither of these solutions work, then you may need to reinstall Anaconda.
What to do if the issue persists after following the steps above
If you’ve tried the steps above and the issue persists, there are a few other things you can try:
1. Restart your computer. This will ensure that any changes you’ve made to your PATH variable are applied.
2. Try using the full path to the conda executable, e.g. C:\Users\YourUserName\AppData\Local\Continuum\anaconda3\Scripts\conda.exe.
3. If you’re using Anaconda Navigator, try opening Anaconda Prompt from the Navigator and running conda from there.
4. Check that you don’t have multiple versions of Anaconda installed. This can cause issues with the PATH variable. If you do have multiple versions installed, try uninstalling all but one and see if that fixes the issue.
Additional tips on using ‘conda’ and troubleshooting common issues
If you’re having trouble getting ‘conda’ to work as an internal or external command, there are a few things you can try. First, make sure that you have the Anaconda bin directory added to your system PATH. This can usually be done by opening the Anaconda Prompt and running the following command:
If that doesn’t work, you can try adding the full path to the ‘conda’ executable to your PATH. For example, on my system the full path is:
Once you have the ‘conda’ executable in your PATH, you should be able to run it from the command line. If you’re still having trouble, try running ‘conda –help’ to see a list of available options.
Conclusion and where to find more information on ‘conda’
Conda is a package manager for Python that allows you to easily install, update and remove Python packages. It also provides a virtual environment manager that lets you create and manage multiple Python virtual environments on your system.
If you’re having trouble getting ‘conda’ to work, make sure that you have added it to your system PATH. You can find more information on how to do this here: https://docs.conda.io/projects/conda/en/latest/user-guide/install/windows.html
Once you have added ‘conda’ to your system PATH, you should be able to run it from the command line. For more information on using ‘conda’, check out the official documentation: https://docs.conda.io/projects/conda/en/latest/