Fix: ‘conda’ is not recognized as an internal or external command, operable program or batch file

Several users are encountering the “conda is not recognized as an internal or external command, operable program or batch file” when trying to run any Anaconda command using Command Prompt.

Conda is not recognised as an internal or exteranl command, operable program or batch file.
Conda is not recognized as an internal or external command, operable program or batch file.

What is causing the ‘conda’ is not recognized as an internal or external command error?

We investigated this particular issue by trying to recreate de error on our machine and by looking at other user reports. Based on what we gathered, there are several scenarios that will trigger this particular error message:

  • Environment PATH for Conda is not set – This is the most common cause why this issue occurs. Keep in mind that the latest Anaconda builds will not automatically add Conda to your System variable paths since it can cause various issues with other software.
  • Environment PATH is incorrectly added – Another popular reason why this issue occurs is to user fault when trying to add the Environment PATH variable manually.
  • Anaconda version is older than the version of the Anaconda Navigator – Some users have reported that the error was no longer occurring after updating Conda to the latest version.

Method 1: Updating Anaconda to the latest version

Several users have reported that the issue was resolved and they were able to run conda commands inside the Command Prompt after updating Conda to the latest version.

As it turns out, you can experience this problem in the event that you’re using a newer  Anaconda Navigator version with an older Conda version. Here’s a quick guide on how you can rectify this:

  1. Access your start menu in the bottom-left corner and search for “anaconda“. Then, click on Anaconda Prompt.
    Use the start menu to open Anaconda Prompt
    Use the start menu to open Anaconda Prompt
  2. Inside the Anaconda Prompt program, run the following commands and press Enter after each one to update Conda to the latest version:
    conda update
    conda install
  3. Wait until the process is complete, then close the Anaconda Prompt and open a CMD window. See if you’re now able to run Conda commands.

If you’re still encountering the “conda is not recognized as an internal or external command, operable program or batch file” error, move down to the next method below.

Method 2: Adding Anaconda to your PATH environment variable during installation

The quickest way to resolve this issue automatically is to reinstall Anaconda and use one advanced option that will all the Anaconda to your PATH environment variable automatically. But keep in mind that using this method might mean that you encourage certain application to conflict with your Anaconda installation.

In any case, if you’re looking for a way to add Anaconda to your PATH environment automatically, follow the steps down below:

Note: If Anaconda is not installed on your computer, skip straight to step 3.

  1. Press Windows key + R to open up a Run dialog box. Then, type “appwiz.cpl” and press Enter to open Programs and Features.
    Run dialog: appwiz.cpl
    Run dialog: appwiz.cpl
  2. Inside Programs and Features, scroll down through the application list and locate the Anaconda distribution. Next, right-click it and choose Uninstall, then follow the on-screen prompts to uninstall it from your system.
    Right-click on your Anaconda distribution and choose Uninstall
    Right-click on your Anaconda distribution and choose Uninstall
  3. Visit this link (here) and download the latest Anaconda distribution by clicking o an icon associated with your operating system.
    Downloading Anaconda Distribution
    Selecting the appropriate OS
  4. Select the appropriate Python version that you want to use with Anaconda by clicking it’s associated Download button.
    Downloading the Anaconda Distribution
    Downloading the Anaconda Distribution
  5. Open the installation executable, hit Next at the first prompt, then accept the Licence Agreement.
    Anaconda Licence Agreement
    Anaconda Licence Agreement
  6. Select the installation type and hit Next once again.
    Select your Installation type, then hit Next again
    Select your Installation type, then hit Next again
  7. Choose the Destination Folder and click the Next button again. We highly recommend that you keep the default location.
    Choosing the location of Anaconda
    Choosing the location of Anaconda
  8. This step is crucial. In the Advanced Installation Options, check the box associated with Add Anaconda to my PATH environment variable (under Advanced Options) and click Install.
    Configuring Anaconda's installation to add the PATH environment variable automatically
    Configuring Anaconda’s installation to add the PATH environment variable automatically
  9. Once the installation is complete, type “conda” inside a Command Prompt. You should no longer see the “conda is not recognized as an internal or external command, operable program or batch file” error.
    Example of a successful conda command inside Command Prompt
    Example of a successful conda command inside Command Prompt

If this method wasn’t effective or you’re looking for a different approach that doesn’t involve reinstalling the whole Anaconda distribution, move down to the next method below.

Method 3: Adding the Conda path manually

If you don’t want to waste time on uninstalling the whole Anaconda distribution, you can update (or verify) the environment variable associated with Conda yourself. But before doing so, it’s important to find out the exact location of your Conda installation.

Follow the guide down below to discover and adjust the Conda PATH manually in Environment Variables:

  1. Access the start menu (bottom-left corner) and search for “anaconda prompt“. Then, click on Anaconda Prompt and wait for the program to open.
    Use the start menu to open Anaconda Prompt
    Use the start menu to open Anaconda Prompt
  2. Inside the Anaconda Prompt program, run the following command and press Enter to check the location of Conda:
    where conda
    Discovering the location of conda
    Discovering the location of conda
  3. Copy the second location previously fetched at step 2, but exclude the executable. For example: C:\Users\madro\Anaconda3\Scripts
  4. Press Windows key + R to open up a Run dialog box. Then, type “sysdm.cpl” and press Enter to open up the System Properties screen.
    Run dialog: sysdm.cpl
    Run dialog: sysdm.cpl
  5. Inside the System Properties window, go to the Advanced tab and click on Environment Variables…

    Go to the Advanced tab and click on Environment variables
    Go to the Advanced tab and click on Environment variables
  6. Inside the Environment variables for *YourUser* window, select the Path variable and click the Edit button.
    Select the Path variable and click Edit
    Select the Path variable and click Edit
  7. Inside the Edit environment variable window, click the New button. Then, add these two locations:
    C:\Users\*YourUser*\Anaconda3\Scripts
    C:\Users\*YourUser*\Anaconda3

    Note: Keep in mind that *YourUser* is only a placeholder. Replace it with your own username. Also, if you’re using an older Anaconda version, change the version number accordingly.

Method 4: Circumventing the issue without adding Anaconda to Environment Path

If you want to avoid adding the Anaconda path to the Environment variables, you can type Conda commands without getting the “conda is not recognized as an internal or external command, operable program or batch file” error by using Command Prompt to navigate to the folder installation first.

But keep in mind that this is not very practical since you’ll have to repeat this procedure whenever you open a new Command Prompt.

If you decide to circumvent the error by adding the Anaconda path to your CMD window, here’s what you need to do:

  1. Press Windows key + R to open up a Run dialog box. Then, type “cmd” and press Enter to open up a Run dialog box.
    Run dialog: cmd
    Run dialog: cmd
  2. Inside the CMD window, type CD followed by the path to your Anaconda folder installation. Unless you installed Anaconda in a similar location, it’s should be something similar to :
    CD C:\Users\*YourUser*\Anaconda3\Scripts
    
  3. Run a command to test Anaconda and see if it’s functioning properly inside Command Prompt. You can use this command:
     
    conda --version
    Testing Anaconda
    Testing Anaconda
ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.