64 def run(self, options: Values, args: List[str]) -> int:
67 reqs_to_uninstall = {}
69 req = install_req_from_line(
74 reqs_to_uninstall[canonicalize_name(
req.name)] = req
77 "Invalid requirement: %r ignored -"
78 " the uninstall command expects named"
83 for parsed_req
in parse_requirements(
84 filename, options=options, session=session
86 req = install_req_from_parsed_requirement(
90 reqs_to_uninstall[canonicalize_name(
req.name)] = req
91 if not reqs_to_uninstall:
93 f
"You must give at least one requirement to {self.name} (see "
94 f
'"pip help {self.name}")'
98 check_externally_managed()
100 protect_pip_from_modification_on_windows(
101 modifying_pip=
"pip" in reqs_to_uninstall
109 if uninstall_pathset:
112 warn_if_run_as_root()