From 5fb075fb2ca66ddc1edbcf448db698a26565ebff Mon Sep 17 00:00:00 2001 From: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Date: Fri, 2 Jan 2026 09:57:22 +0800 Subject: [PATCH] Show reason for installation failure in `check_requirements()` (#23097) Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Co-authored-by: Glenn Jocher --- ultralytics/utils/checks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ultralytics/utils/checks.py b/ultralytics/utils/checks.py index 426eccde..80a701ee 100644 --- a/ultralytics/utils/checks.py +++ b/ultralytics/utils/checks.py @@ -489,7 +489,10 @@ def check_requirements(requirements=ROOT.parent / "requirements.txt", exclude=() f"{prefix} {colorstr('bold', 'Restart runtime or rerun command for updates to take effect')}\n" ) except Exception as e: - LOGGER.warning(f"{prefix} ❌ {e}") + msg = f"{prefix} ❌ {e}" + if hasattr(e, "output") and e.output: + msg += f"\n{e.output}" + LOGGER.warning(msg) return False else: return False