Created
August 9, 2020 00:07
-
-
Save EdThePro101/0b63edc6502692085c57374b7f15c8eb to your computer and use it in GitHub Desktop.
Update all Python packages with pip.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python pip-upgrade-all.py | |
# | |
# This file will upgrade all Python packages that are out of date. | |
# | |
# This file is a snippet from a Stack Overflow answer. | |
# Link: https://stackoverflow.com/a/5839291/9591441 | |
import pkg_resources as pkg_res | |
from subprocess import call | |
packages = [package.project_name for package in pkg_res.working_set] | |
call('pip install --upgrade ' + ' '.join(packages), shell=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment