diff --git a/src/poetry/installation/executor.py b/src/poetry/installation/executor.py index 8f28e1a9677..9af79d7bdef 100644 --- a/src/poetry/installation/executor.py +++ b/src/poetry/installation/executor.py @@ -148,6 +148,14 @@ def execute(self, operations: list[Operation]) -> int: self._sections = {} self._yanked_warnings = [] + # pip has to be installed/updated first without parallelism + # because we still need it for uninstalls + for i, op in enumerate(operations): + if op.package.name == "pip": + wait([self._executor.submit(self._execute_operation, op)]) + del operations[i] + break + # We group operations by priority groups = itertools.groupby(operations, key=lambda o: -o.priority) for _, group in groups: