Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
upgrader.py - upgrade all your pip packages one by one.
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)
@eladkarako

This comment has been minimized.

Copy link
Owner Author

commented Mar 8, 2019

First run python pip list --outdated
and wait until the checking process is done,
you will see a list of all of the packages (wheel/sdist) that have a more updated version.

next place above upgrader.py file somewhere and run python ./upgrader.py,
wait until everything is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.