Python / Conda

bash: conda: command not found

Covers: bash conda command not found · command not found conda · zsh: command not found: conda — May 2026

🐧 Linux (bash) 🍎 macOS (zsh) 🪟 Windows (WSL)
$ conda activate myenv
bash: conda: command not found

# or on macOS zsh:
zsh: command not found: conda

⚡ Quick Fix — Initialize conda in your shell

# Find where conda is installed: find / -name "conda" -type f 2>/dev/null | head -5 # Then initialize (replace path with yours): ~/miniconda3/bin/conda init bash # for bash ~/miniconda3/bin/conda init zsh # for zsh (macOS default) # Reload your shell: source ~/.bashrc # bash source ~/.zshrc # zsh

Why Does This Happen?

Conda is installed but its bin directory is not in your shell's PATH, or conda's shell initialization block hasn't been added to your ~/.bashrc / ~/.zshrc. This often happens after:

Fix: Add conda to PATH Manually

# For Miniconda3 in home directory (bash): echo 'export PATH="$HOME/miniconda3/bin:$PATH"' >> ~/.bashrc source ~/.bashrc # For Anaconda3 (bash): echo 'export PATH="$HOME/anaconda3/bin:$PATH"' >> ~/.bashrc source ~/.bashrc # For zsh (macOS): echo 'export PATH="$HOME/miniconda3/bin:$PATH"' >> ~/.zshrc source ~/.zshrc

Preferred Fix: conda init

Using conda init is the recommended approach — it adds the full conda activation script to your shell config, which properly handles conda activate and environment management:

# Run the conda binary directly first: ~/miniconda3/bin/conda init # For zsh specifically: ~/miniconda3/bin/conda init zsh # Restart terminal or run: source ~/.bashrc # or ~/.zshrc # Verify: conda --version

conda Not Installed At All?

# Install Miniconda3 (lightweight, recommended): wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh # macOS (Apple Silicon): curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh bash Miniconda3-latest-MacOSX-arm64.sh