Pip, the Python package management system, still lacks an easy way to update all installed packages. The “upgrade-all” ability has been in the works for nearly 4 years now.
In the meantime, many simple hacks have evolved to meet the demand. They’re all simple, and quite slow.
About six months ago I wrote a fast Python script to upgrade all local pip packages.
The idea is simple.
import pip import queue
Then, query pip for the list of installed packages:
def buildQueueOfInstalledPackages(): distQueue = queue.Queue() for dist in pip.get_installed_distributions(): distQueue.put(dist) return distQueue
Here is where my script gets interesting: