TL;DR: log_evaluation was added in lightgbm 4.0 and your install is older. Upgrade lightgbm and the import works.

## The error
```text
ImportError: cannot import name 'log_evaluation' from 'lightgbm'
```

## Fix it
1. Upgrade lightgbm:
   ```
   pip install -U lightgbm
   ```
   Expected: installs lightgbm 4.0 or newer.
2. Verify:
   ```
   python -c "from lightgbm import log_evaluation; print('ok')"
   ```
   Expected: prints ok.

## When this applies
Use this when code does `from lightgbm import log_evaluation` on lightgbm below 4.0.

## When it does not apply
If lightgbm is already 4.0+ and the import still fails, the install is corrupt; reinstall. If the error names a different callback, check when it was added.

## Compatibility
lightgbm 4.0+. log_evaluation does not exist on 3.x.

## Root cause
lightgbm 4.0 reworked the callback API and added log_evaluation (and early_stopping) as importable names. Code written against 4.0+ breaks on older installs that never had the name.

## Edge cases
The 4.0 upgrade also changed some parameter behaviors; run your training once to confirm metrics match expectations. If other pins force lightgbm 3.x, write the logging callback by hand instead.