diff --git a/src/pip/_internal/req/req_uninstall.py b/src/pip/_internal/req/req_uninstall.py index 779e93b44af..18cc987e89b 100644 --- a/src/pip/_internal/req/req_uninstall.py +++ b/src/pip/_internal/req/req_uninstall.py @@ -532,8 +532,9 @@ def from_dist(cls, dist: Distribution) -> "UninstallPathSet": link_pointer = os.path.normcase(fh.readline().strip()) assert ( link_pointer == dist.location - ), "Egg-link {} does not match installed location of {} (at {})".format( - link_pointer, dist.project_name, dist.location + ), "Egg-link located at {} and pointing to {} does not match "\ + "installed location of {} at {}".format( + develop_egg_link, link_pointer, dist.project_name, dist.location ) paths_to_remove.add(develop_egg_link) easy_install_pth = os.path.join(