TL;DR: the macOS xgboost wheel needs the OpenMP runtime and it is missing. Run `brew install libomp`, or install xgboost from conda-forge instead.

## The error
```text
XGBoost Library (libxgboost.dylib) could not be loaded.
```

## Fix it
1. Install the OpenMP runtime:
   ```
   brew install libomp
   ```
   Expected: installs libomp.dylib.
2. Verify:
   ```
   python -c "import xgboost; print(xgboost.__version__)"
   ```
   Expected: prints the version, no error.
3. Alternative without Homebrew: use the conda-forge build, which handles OpenMP itself:
   ```
   conda install -c conda-forge xgboost
   ```

## When this applies
Use this when `import xgboost` on macOS raises the libxgboost.dylib load error, usually with the rpath libomp.dylib reference mentioned below it.

## When it does not apply
On Linux the missing library is libgomp.so (a different fix). On Windows it is the vcomp DLL. If the error is an ImportError for a Python name instead, that is a separate issue.

## Compatibility
macOS, pip-installed xgboost wheels.

## Root cause
The macOS wheel links OpenMP dynamically against Homebrew's libomp path instead of bundling it. Without Homebrew's libomp installed, the dynamic loader cannot resolve the reference and the whole native library fails to load.

## Edge cases
Apple-silicon and Intel Macs both need this; the brew path differs but brew install libomp handles either. In CI without brew, the conda-forge package is the reliable route.