Last updated: Apr 4, 2024
Reading time·5 min
The error "'conda' is not recognized as an internal or external command, operable program or batch file" occurs for 2 main reasons:
If you don't have Anaconda installed, scroll down to the next subheading.
To solve the error if you have Anaconda installed:
where conda
to get the location of your Anaconda installation.where conda
For example, in my case, Anaconda is installed under the following path.
C:\Users\YOUR_USER\anaconda3
This means that I have to add the following 3 paths to my user's PATH environment variable.
C:\Users\YOUR_USER\anaconda3 C:\Users\YOUR_USER\anaconda3\Scripts C:\Users\YOUR_USER\anaconda3\Library\bin
where conda
command to add them or simply click
"New" and add the paths directly.For me, the paths look as follows.
C:\Users\YOUR_USER\anaconda3 C:\Users\YOUR_USER\anaconda3\Scripts C:\Users\YOUR_USER\anaconda3\Library\bin
Make sure to replace the YOUR_USER
placeholder with your actual username if
your Anaconda installation location is C:\Users\YOUR_USER\anaconda3
,
otherwise, issue the where conda
command in Anaconda Prompt.
Here is what it looks like for me after I've added the 3 paths.
Once the three paths are added, confirm the changes by clicking on the "OK" button twice.
Close your Command prompt application and then reopen it.
You might also have to restart your PC, but that's not always necessary.
Open a new Command Prompt and run the conda --version
command to make sure
everything works as expected.
conda --version conda install anaconda-navigator
If you get a permissions error when running a conda
command, you have to open
CMD as an administrator and rerun the command.
To open CMD as an administrator:
Click on the Search bar and type CMD.
Right-click on the Command Prompt application and click "Run as administrator".
Note that you can use the Anaconda Prompt, in which the conda
command will
always be available or the Anaconda Navigator.
You can find either application using the Search bar.
If the error persists, download the official installer.
If you have Anaconda installed, you have to uninstall it before starting the installer.
where conda
command to get the location where Anaconda is
installed.where conda
For me, it is C:\Users\YOUR_USER\anaconda3
.
To solve the error "'conda' is not recognized as an internal or external command, operable program or batch file":
C:\Users\YOUR_USER\anaconda3
directory if it isn't empty.Once the "Add Anaconda3 to my PATH environment variable" option is checked, click on "Install".
Lastly, click on "Finish".
Once the installation process completes, you have to restart any active Command Prompt or PowerShell sessions.
Open CMD and try to run the following commands to verify that the conda
command is available.
conda --version conda install anaconda-navigator
If you get a permissions error when running a conda
command, you have to open
CMD as an administrator and rerun the command.
To open CMD as an administrator:
Click on the Search bar and type CMD.
Right-click on the Command Prompt application and click "Run as administrator".
Note that you can also use the Anaconda Prompt, in which the conda
command
will always be available or the Anaconda Navigator.
You can find either application using the Search bar.
To solve the error "'conda' is not recognized as an internal or external command, operable program or batch file", make sure:
You can learn more about the related topics by checking out the following tutorials: