Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/9139.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bring back the "(from versions: ...)" message, that was shown on resolution failures.
9 changes: 8 additions & 1 deletion src/pip/_internal/resolution/resolvelib/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,17 @@ def _report_single_requirement_conflict(self, req, parent):
req_disp = str(req)
else:
req_disp = f"{req} (from {parent.name})"

cands = self._finder.find_all_candidates(req.project_name)
versions = [str(v) for v in sorted({c.version for c in cands})]

logger.critical(
"Could not find a version that satisfies the requirement %s",
"Could not find a version that satisfies the requirement %s "
"(from versions: %s)",
req_disp,
", ".join(versions) or "none",
)

return DistributionNotFound(f"No matching distribution found for {req}")

def get_installation_error(
Expand Down