Skip to content

Instantly share code, notes, and snippets.

Created August 9, 2020 00:07
What would you like to do?
Update all Python packages with pip.
# python
# This file will upgrade all Python packages that are out of date.
# This file is a snippet from a Stack Overflow answer.
# Link:
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