From 2020a586ec8964a7df84368780c12bd0f34918b4 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Mon, 27 Feb 2023 21:49:53 +0100 Subject: [PATCH] Fix pip package update script --- arch-config/scripts/pieces/pip-update.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch-config/scripts/pieces/pip-update.py b/arch-config/scripts/pieces/pip-update.py index 5958d708..1eea8941 100755 --- a/arch-config/scripts/pieces/pip-update.py +++ b/arch-config/scripts/pieces/pip-update.py @@ -1,6 +1,10 @@ #!/usr/bin/env python3 import pkg_resources -from subprocess import call +import subprocess +# get a list of all packages installed packages = [dist.project_name for dist in pkg_resources.working_set] -call("pip install --upgrade " + ' '.join(packages), shell=True) + +# update each package +for package in packages: + subprocess.call("pip install --upgrade {}".format(package), shell=True)