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

The error “’conda’ is not recognized as an internal or external command, operable program or batch file” appears when Command Prompt cannot locate the Conda executable. When this happens, Conda or Anaconda commands cannot run in the terminal.

The most common reason is that the Conda installation directory is missing from the Windows PATH environment variable. It can also occur if the shell was not initialized for Conda or if PATH entries were removed after installation.

This issue can affect both Anaconda and Miniconda installations because both rely on the conda command being available in the system PATH or properly initialized for the shell.

If Conda works in the Anaconda Prompt but not in the regular Command Prompt, the problem is almost always related to PATH configuration or shell initialization. The methods below resolve both situations.

1. Initialize Conda for Command Prompt

Recent versions of Conda rely on shell initialization to make the conda command available in different terminals. If Command Prompt has not been initialized, Conda will not be recognized.

  1. Open the Start Menu and search for Anaconda Prompt.
  2. Launch Anaconda Prompt.
    Opening Anaconda Prompt from the Start menu
  3. Run the following command:
    conda init cmd.exe
  1. Close and reopen Command Prompt.
  2. Verify Conda:
    conda --version

If a version number appears, Command Prompt is now configured to recognize Conda.

2. Check if Conda Exists in PATH

Before modifying system settings, check whether Windows can already locate the Conda executable.

  1. Open Command Prompt.
  2. Run the following command:
    where conda

If no location is returned, Conda is not available in the system PATH and must be added manually.

3. Add the Conda Installation Directory to PATH Manually

If Conda directories are missing from PATH, Windows cannot locate the executable. Adding them allows Conda commands to run from any terminal.

  1. Press Windows + R, type sysdm.cpl, then press Enter.
    Run dialog opening System Properties with sysdm.cpl
  2. Open the Advanced tab and click Environment Variables.
    Environment Variables window in Windows system settings
  3. Select the Path variable and click Edit.
  4. Add the Conda directories depending on your installation location:
    C:\Users\YourUser\Anaconda3
    C:\Users\YourUser\Anaconda3\Scripts
    C:\Users\YourUser\Anaconda3\Library\bin

For Miniconda installations:

C:\Users\YourUser\miniconda3
C:\Users\YourUser\miniconda3\Scripts
C:\Users\YourUser\miniconda3\Library\bin

Some systems install Anaconda globally:

C:\ProgramData\Anaconda3
  1. Replace YourUser with your Windows username.
  2. Click OK to save the changes.
  3. Restart Command Prompt and test Conda again.

4. Update Anaconda

If Conda exists but the environment configuration is damaged or outdated, updating Anaconda can restore missing components.

  1. Open Anaconda Prompt.
  2. Run:
    conda update conda
    conda update anaconda
  1. After the update completes, reopen Command Prompt.
  2. Verify Conda:
    conda --version

5. Reinstall Anaconda with PATH Configuration Enabled

If the installation is incomplete or heavily misconfigured, reinstalling Anaconda ensures all components and environment variables are configured correctly.

Note: Adding Anaconda to PATH can conflict with other Python installations. Use this option only if you want Conda available in all terminals.

  1. Visit the Anaconda download page.
    Selecting the correct operating system for Anaconda download
  2. Download the installer for your system.
    Downloading the Anaconda distribution installer
  3. Run the installer.
  4. Under Advanced Options, enable Add Anaconda to my PATH environment variable.
    Anaconda installer option to add the program to the PATH variable
  5. Complete installation.
  6. Restart the terminal and verify:
    conda --version

6. Use Anaconda Prompt Instead

If you prefer not to modify system PATH variables, you can use the Anaconda Prompt. This terminal is already configured with the correct environment variables.

  1. Open the Start Menu.
  2. Search for Anaconda Prompt.
  3. Run:
    conda --version

    Successful Conda command output in the terminal

If Conda works in Anaconda Prompt but not in the regular Command Prompt, the cause is almost always missing PATH entries or shell initialization. Applying the solutions above will restore Conda functionality across terminals.

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.

Comments

12
    ЕВ
    Ежевичное Варенье Oct 31, 2019

    “option that will all the Anaconda to your PATH environment” – add, not all.

    DB
    Dila Bayındır Feb 26, 2020

    I did everything you suggested but it still keeps saying “conda is not recognized as an internal or external command, operable program or batch file”. I also have the “access denied” error when i start the anaconda prompt, when i open the prompt as an administrator it says “system cannot find the path specified”. I lost count how many times i re-downloaded anaconda, i really could use some help.

      SW
      Shane Warren Author Feb 29, 2020

      If you have added it to your path it should work. What version and type of Windows are you using?

    JD
    John Dailey Apr 8, 2020

    Thank you very much, Kevin 🙂 I got to the end, used “conda init cmd.exe” in the windows command prompt, and it worked! Of course, I did this after I had done everything else, besides reinstall. (I had already done that enough times, lol).

    Reply
    MZ
    Muse Zeleke Jul 22, 2020

    thank you, this was very helpful.

    TA
    Tanaya Aug 25, 2020

    I tried everything given here, still can’t install conda. My computer is Windows 7 64 bit. What should I do now?

      SW
      Shane Warren Author Aug 27, 2020

      It should be working if you have done all of this, maybe try accessing it in the safe mode?

    TB
    Timothy Anuoluwapo BABATUNDE Dec 23, 2020

    My anaconda does not open again and whenever I open it, it loads Python shell how do I go about it.

      MZ
      Muhammad Zubyan Author Dec 26, 2020

      Try method 3 suggested in the article I am certain that it will help you fix this issue. Keep me updated!

    RA
    Raath666 Jan 1, 2021

    Hi Kevin,
    this was really helpful. After second method, i can open anaconda navigator from terminal.
    But, I’m not getting the navigator or anaconda prompt in the start menu.Any solution for this?

      MZ
      Muhammad Zubyan Author Jan 2, 2021

      Reinstalling should fix the issue for you as it will re add all the start menu entries.

    MA
    Martin Jan 15, 2022

    Thanks a lot for the guide.