2021-10-22 17:29:01 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import pkg_resources
|
2023-02-27 21:49:53 +01:00
|
|
|
import subprocess
|
2021-10-22 17:29:01 +02:00
|
|
|
|
2023-02-27 21:49:53 +01:00
|
|
|
# get a list of all packages installed
|
2021-10-22 17:29:01 +02:00
|
|
|
packages = [dist.project_name for dist in pkg_resources.working_set]
|
2023-02-27 21:49:53 +01:00
|
|
|
|
|
|
|
# update each package
|
|
|
|
for package in packages:
|
|
|
|
subprocess.call("pip install --upgrade {}".format(package), shell=True)
|