johnmahugu

pip upgrade

May 6th, 2016
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. # Update all your installed Python libraries via pip
  2. # From http://stackoverflow.com/questions/2720014/upgrading-all-packages-with-pip
  3.  
  4. import pip
  5. from subprocess import call
  6.  
  7. for dist in pip.get_installed_distributions():
  8.     call("pip install --upgrade " + dist.project_name, shell=True)
Add Comment
Please, Sign In to add comment