Pip Upgrade

Source URL: https://stackoverflow.com/questions/2720014/how-to-upgrade-all-python-packages-with-pip

Language: python

Created on: 2020-12-15 17:17:34

import pkg_resources
from subprocess import call

packages = [dist.project_name for dist in pkg_resources.working_set]
call("pip install --upgrade " + ' '.join(packages), shell=True)
Is it possible to upgrade all Python packages at one time with pip? Note: that there is a feature request for this on the official issue tracker.