TL;DR: Install tensorflow in the Python you are actually running: `pip install tensorflow`. If pip says it is already installed, you have an interpreter mismatch, check `python -c "import sys; print(sys.executable)"` against where pip installed it. On Apple Silicon use `tensorflow-macos`, not `tensorflow`.

The error:
```text
ModuleNotFoundError: No module named 'tensorflow'
```

## Fix
1. Run `python -c "import sys; print(sys.executable)"` then `python -m pip show tensorflow`
   Expected: either shows tensorflow info or confirms it is missing from this interpreter
2. Install: `python -m pip install tensorflow` (or `tensorflow-macos` on Apple Silicon)
   Expected: Successfully installed tensorflow
3. Verify: `python -c "import tensorflow as tf; print(tf.__version__)"`
   Expected: prints the version, no error

## When this applies
- No module named 'tensorflow' on import
- pip list shows tensorflow but the script still fails (interpreter mismatch)

## When this does not apply
- import fails with a DLL or .so error (installed but broken)
- you need GPU support, that is a separate install decision

## Version compatibility
tensorflow 2.x CPU. For GPU on Linux use the CUDA-enabled build per the TF install docs; Apple Silicon uses tensorflow-macos + tensorflow-metal.

## Why it happens
TensorFlow is a large package that people often install with one pip/python and run with another (system python, venv, conda, notebook kernel). The module simply is not on sys.path of the running interpreter.

## Edge cases
- Always use `python -m pip` so the installer targets the interpreter you run.
- In notebooks, restart the kernel after installing.
- tensorflow does not publish an official Windows GPU wheel for 2.11+; CPU wheel or WSL2 instead.