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

‘conda’ is not recognized as an internal or external command, operable program or batch file” indicates that the Command Prompt cannot find the conda program, blocking the use of Anaconda’s command-line tools. This is usually because the Anaconda folder isn’t included in the system’s PATH settings. The main cause is that the “Add to PATH” option was unchecked during installation.

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

A misconfigured or incomplete Anaconda setup can also lead to this error.

In this article, we will discuss different ways to solve this error.

1. Update Anaconda

Outdated Anaconda versions might lack necessary bug fixes or path settings, causing conda to not work in the Command Prompt. Updating to the latest version can resolve these issues and reset the PATH settings, allowing conda commands to run without manual changes. This ensures a stable and supported setup.

  1. Open the start menu and search for “Anaconda“. Click on Anaconda Prompt to launch it.
    Use the start menu to open Anaconda Prompt
    Use the start menu to open Anaconda Prompt
  2. In the Anaconda Prompt, run the following commands, pressing Enter after each one to update Conda:
    conda update conda
    conda update anaconda
  3. Once the updates are complete, close Anaconda Prompt and open the Command Prompt (CMD) to check if you can run Conda commands successfully.

2. Add Anaconda To Your PATH Environment Variable During Installation

The issue might occur if you don’t select the “Add Anaconda to my PATH environment variable” option during installation. Without this, Windows can’t find the conda command, leading to the “command not recognized” error.

  1. Visit the Anaconda download page directly to get the latest distribution for your OS.
    Selecting the appropriate OS
    Selecting the appropriate OS
  2. Download the Anaconda installer for your preferred Python version.
    Downloading the Anaconda Distribution
    Downloading the Anaconda Distribution
  3. Run the installer, accept the Licence Agreement, and choose the default installation settings. Ensure you select “Add Anaconda to my PATH environment variable” under Advanced Options.
    Configuring Anaconda's installation to add the PATH environment variable automatically
    Configuring Anaconda’s installation to add the PATH environment variable automatically
  4. After installation, open the Command Prompt and type “conda” to verify successful setup without errors.
    Example of a successful conda command inside Command Prompt
    Example of a successful conda command inside Command Prompt

3. Add the Conda Path Manually

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

  1. Press Windows key + R, type “sysdm.cpl“, and press Enter to access System Properties.
    Run dialog: sysdm.cpl
    Run dialog: sysdm.cpl
  2. 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
  3. Select Path, click Edit, then New, and add:
    C:\Users\*YourUser*\Anaconda3\Scripts
    C:\Users\*YourUser*\Anaconda3
  4. Note: Replace *YourUser* with your username. Adjust version numbers if necessary.

4. Avoid the Issue Without Adding Anaconda to the Environment Path

If you don’t want to change the PATH variable, use the Anaconda Prompt, which is set up for conda commands. This keeps Anaconda separate from other system settings and lets you run conda commands without affecting the global PATH.

  1. Open the Anaconda Prompt from the Start menu. This automatically configures conda commands without altering the global PATH.
    Use the start menu to open Anaconda Prompt
    Use the start menu to open Anaconda Prompt
  2. Once open, test if Anaconda is functioning by running:
    conda --version
    Example of a successful conda command inside Command Prompt
    Example of a successful conda command inside Command Prompt
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.