# How to fix ModuleNotFoundError: No module named 'sklearn'

Same name game: `pip install scikit-learn`, `import sklearn`. Run `python -m pip install scikit-learn` with the python you actually use. If pip says it is already there, your `python` and `pip` point at different environments; `python -m pip` fixes that class of problem permanently.

## The exact error

```text
ModuleNotFoundError: No module named 'sklearn'
```

## Fix it

1. `python -m pip install scikit-learn`
   Expected: Successfully installed scikit-learn

2. `python -c "import sklearn; print(sklearn.__version__)"`
   Expected: prints a version

3. Check env match: `python -c "import sys; print(sys.executable)"`.
   Expected: same env pip installed into

## When this applies

`import sklearn` -> No module named 'sklearn'

## When this does NOT apply

sklearn imports but a submodule is missing (version issue)

## Versions

any

## Why it happens

pip distribution name (scikit-learn) differs from import name (sklearn).

## Edge cases

Do not `pip install sklearn` (a dummy package); always scikit-learn.
