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 <glenn.jocher@ultralytics.com>
This commit is contained in:
Mohammed Yasin 2026-01-02 09:57:22 +08:00 committed by GitHub
parent 2b144264d2
commit 5fb075fb2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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