From d7c367f095c2f77bbdb4e748102c3e191dbaf902 Mon Sep 17 00:00:00 2001 From: Arksine Date: Mon, 24 May 2021 06:38:10 -0400 Subject: [PATCH] update_manager: update pip before installing new python deps Signed-off-by: Eric Callahan --- moonraker/components/update_manager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/moonraker/components/update_manager.py b/moonraker/components/update_manager.py index 324c231..5c58c2e 100644 --- a/moonraker/components/update_manager.py +++ b/moonraker/components/update_manager.py @@ -814,6 +814,10 @@ class GitUpdater(BaseUpdater): pip = os.path.join(bin_dir, "pip") self._notify_status("Updating python packages...") try: + # First attempt to update pip + await self.cmd_helper.run_cmd( + f"{pip} install -U pip", timeout=1200., notify=True, + retries=3) await self.cmd_helper.run_cmd( f"{pip} install -r {reqs}", timeout=1200., notify=True, retries=3)