'conda' is not recognized as an internal or external command
Your shell cannot find the conda program — it is installed but not on this shell's PATH. Use the Anaconda Prompt, or run conda init once from it.
Updated
The error
'conda' is not recognized as an internal or external command, operable program or batch file.
On macOS and Linux:
conda: command not found
What it means
The shell searches a list of folders — the PATH — for any command you type, and conda's folder is not on this shell's list. Conda is almost certainly installed; this particular shell cannot see it. Installation and visibility are separate things, and the installer deliberately leaves system PATH alone by default to avoid conflicts.
Why it happens
On Windows, the Anaconda/Miniconda installer's "Add to PATH" checkbox is unticked by default (with a warning against ticking it). The supported route is the "Anaconda Prompt" — a shortcut that sets PATH before opening the shell. People instead open plain PowerShell or CMD, or a VS Code terminal, and find no conda. On macOS/Linux, the installer edits one shell's startup file; using a different shell, or skipping the final "initialize?" question, produces the same result.
How to fix it
1. On Windows: open "Anaconda Prompt" from the Start menu. Conda works there immediately. If that satisfies your workflow, you are done.
2. To make conda work in PowerShell and other terminals, run conda init once — from the Anaconda Prompt:
conda init powershellOr conda init alone to cover the shells it detects. Close and reopen the terminal. If PowerShell then refuses to load its profile, allow local scripts once:
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned3. On macOS/Linux, activate by path once, then init.
source ~/miniconda3/bin/activate
conda initAdjust the path if you installed elsewhere (~/anaconda3, /opt/miniconda3). Reopen the terminal; the (base) prefix in the prompt confirms success.
4. In VS Code, pick the interpreter instead of fighting the terminal. Ctrl+Shift+P → "Python: Select Interpreter" → choose the conda environment. VS Code then activates it in its own terminals.
5. Nothing installed after all? Install Miniconda (or Miniforge, preconfigured for conda-forge) — the full Anaconda distribution is optional weight.
How to prevent it
Run conda init for your shells right after installation and be done with PATH puzzles. Keep one habit: check the prompt for the environment prefix ((base), (ml)) before installing or running anything — it confirms both that conda is live and which environment will receive your command.
Related errors
- Solving environment: failed (conda) — the next conda hurdle
- error: externally-managed-environment — the pip-side environment lesson
- ModuleNotFoundError: No module named 'torch' — what PATH confusion causes at import time