[Solved] Conda is not recognized as an internal or external command

What is an Anaconda?

Anaconda is an open-source distribution platform of Python and R programming languages. It is used to manage and deploy packages for different projects related to Artificial Intelligence, Data Science, and Machine Learning Applications. Its distribution package is compatible with Windows, Linux, and macOS platforms. You can access and use Anaconda from the command line and also from Anaconda Navigator. Anaconda Navigator is a graphical user interface platform to access anaconda functions.

You are here means you must be facing “Conda is not recognized as an internal or external command, operable program or batch file” error while using anaconda command. Go through this article thoroughly to understand the reasons behind this error message and possible solutions.

Conda is not recognized as an internal or external command, operable program or batch file" error

Why you are getting “Conda is not recognized as an internal or external command” error message

There are following three possible reasons for this error message. Let’s understand one by one.

1. Anaconda application is not installed on your system.

First thing is to check whether you have installed Anaconda on your system or not. If an anaconda application is not installed on your system then of course you will get this error message because you are trying to access something that is not available on the system itself.

You can use the control panel to check if anaconda is installed on your system or not. If you have installed an anaconda on your system then move to the next solution.

2. Wrong or missing executable location path from a system environment variable.

If you have installed an anaconda application then check the Path environment values and make sure the correct value of the anaconda executable path is available.

Enter the following command on the command prompt to get values of a Path environment variable.

Echo %PATH%

3. Conflict with other applications environment variable

It’s a very rare scenario but sometimes environment variables of other applications may result in improper functioning of anaconda application.

Check other installed applications once and make sure they are not causing any conflict with the anaconda executable.    

Solutions for Conda is not recognized as an internal or external command.

Here we are assuming that you have successfully installed the required version of anaconda on your system. If not please install it before moving further.

There are following three possible solutions which you can use to get rid of this error message

1. Set environment variable from command prompt

You can always set an environment variable from the command prompt as sown below:

Step 1: Open command prompt

Step 2: Copy path of installed anaconda application from your system

Step 3: Set value of anaconda executable location in the system path variable as shown below

Set environment variable on command prompt

Step 4: Execute the required anaconda command.

Note:

This setting is applicable for particular command prompt instances. If you open another command prompt then you need to set the required environment variable again.

2. Add executable path to a system environment variable

Instead of setting an environment variable on the command prompt, you can directly add it to the system environment variable using a control panel. When you add this path value to the system environment variable then it will be applicable for all the users available on the system.

Follow the below stepwise procedure to add an anaconda executable path to the system environment variable.

Step 1:  Go to Control Panel — > System and Security — > System and select Advanced System Settings as shown below

[Solved] Conda is not recognized as an internal or external command

Step 2: In the System Properties window, select the Advanced section and click on the Environment Variables option to open the environment variable section.

Environment Variable

Step 3:

The environment variable window consists of two sections, user variable, and system variable.

Here we will set the required value of anaconda application executable on system variable so that this configuration will be applicable for all the users of the system.

When you install the anaconda application, all the required executable gets added into the Scripts folder of the anaconda installation.

Add path up to scripts folder of anaconda in the path variable value as shown below and click ok button.

Set anaconda scripts executable environment variable

Note:  After changing the environment variable value, make sure to open a new command prompt to execute conda command, or else you will again get “conda is not recognized as an internal or external command” error message.

3. Use an anaconda command prompt

Instead of using a system command prompt, you can directly use the Anaconda command prompt as shown below to access the anaconda functionality.

Anaconda command prompt

In this case, you don’t need to set anaconda executable environment variable.

You can directly access the anaconda command prompt from the Start menu by searching anaconda in the search box.

Note:

At the time of anaconda installation, in the Advanced Installation Options if you select the “Add Anaconda 3 to the system PATH environment variable” option then installable automatically sets the required environment variable. You don’t need to set it explicitly as explained above.

Add anaconda3 to the system PATH environment variable

Final Thoughts:

In this article we have learned three different methods that we can follow to get rid of the “Conda is not recognized as an internal or external command, operable program or batch file” error message.

It’s up to you which approach to follow based on your convenience. Here at Technolads, we recommend using the Anaconda command prompt instead of setting the environment variable to avoid conflict with other applications.

Finally, we hope you are able to resolve the error message and able to use the required anaconda functionality. Please share your views and experience in the comment section or you can reach out to us using the contact form.

Leave a Comment