Fix pip package update script
This commit is contained in:
parent
f39a3c66c9
commit
2020a586ec
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user