TL;DR: your lightgbm install is a mix of versions from a partial upgrade. Reinstall lightgbm cleanly so every module comes from one version.

## The error
```text
ImportError: cannot import name 'concat' from 'lightgbm.compat'
```

## Fix it
1. Uninstall lightgbm fully:
   ```
   pip uninstall -y lightgbm
   ```
   Expected: reports removal.
2. Check for leftover lightgbm folders in site-packages and delete them by hand.
3. Install fresh:
   ```
   pip install lightgbm
   ```
   Expected: install completes.
4. Verify:
   ```
   python -c "import lightgbm; print(lightgbm.__version__)"
   ```
   Expected: prints the version, no error.

## When this applies
Use this when `import lightgbm` itself raises the concat error, which signals mixed install files rather than a real API problem.

## When it does not apply
If your own code imports from lightgbm.compat, stop; it is a private module. If the error appears only in one project, check for a vendored lightgbm copy shadowing the install.

## Compatibility
Any lightgbm version; this is an install-hygiene issue, not a version issue.

## Root cause
lightgbm.compat is a private compatibility module whose contents change between releases. A partial upgrade (or pip and conda both installing lightgbm) leaves old and new files side by side, and the mismatched modules cannot import each other's names.

## Edge cases
If pip and conda both manage the env, pick one installer for lightgbm and uninstall the other copy. In docker, pin the lightgbm version so rebuilds stay consistent.