Fix pip package update script

This commit is contained in:
RealStickman 2023-02-27 21:49:53 +01:00
parent f39a3c66c9
commit 2020a586ec

View File

@ -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)