configs/arch-config/scripts/pieces/pip-update.py

11 lines
295 B
Python
Raw Permalink Normal View History

#!/usr/bin/env python3
import pkg_resources
2023-02-27 21:49:53 +01:00
import subprocess
2023-02-27 21:49:53 +01:00
# get a list of all packages installed
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)