How can I troubleshoot the issue of “conda is not recognized as an internal or external command” in Python?

199    Asked by Unnatigautam in Python , Asked on Jan 5, 2024

 I am currently trying the set up a Python-based environment by using the Anaconda, however, while trying to execute a conda command, I encountered an error message that said “cinda is not recognized as an internal or external command.” How can I troubleshoot this particular issue for the smooth functioning of conda commands? 

Answered by Chloe Burgess

In the context of Python programming language, if you are getting the error message “conda is not recognized as Internal or external command”, it might raise that the system doesn’t recognize the conda command-line tool. Here is how you can approach this:-

1. Check installation

First, ensure that you have correctly installed the Anaconda or Miniconda into your particular system.

Environment variables

Secondly, verify that your Anaconda or Miniconda installation path should be added to the PATH environment variable.

Restart the terminal/shell

After updating the variable PATH, restart your terminal and command prompt to apply the changes. This would inform the system that the environment variables should be updated.

Reinstallation

If the issues persist, try to uninstall and then install the Anaconda and Miniconda.

Here is the example given of how you can check and update the PATH variable in the prompt of Windows:-

# Check the current PATH variable
Echo %PATH%
# If Anaconda/Miniconda path is missing, add it to the PATH variable
Set PATH=C:path onacondain;%PATH%
In the system of Unix/Linux/macOS terminal you can apply this:-
# Check the current PATH variable
Echo $PATH
# If Anaconda/Miniconda path is missing, add it to the PATH variable
Export PATH=”/path/to/anaconda/bin:$PATH”

Your Answer

Interviews

Parent Categories