Cannot activate conda/mamba environment in Claude Code session
06:15 21 Aug 2025

I'm trying out Claude Code and want it to activate and use a pre-existing conda environment.

I told it to run micromamba activate py12 to activate the py12 environment. This doesn't seem to work: afterwards there's still no python available.

This is what I've tried:

> just run micromamba activate py12

  Bash(micromamba activate py12)
  ⎿  (No content)

⏺ Bash(python generate_clades_tsv.py)
  ⎿  Error: zsh: command not found: python

It seems that the activation failed silently - maybe some environment variables weren't set appropriately.

How can one activate a conda environment from within Claude Code?

python conda mamba micromamba claude-code