Skip to content

Instantly share code, notes, and snippets.

@jabez007
Created February 16, 2018 03:03
Show Gist options
  • Save jabez007/91efcf04d7dadfc56f33ff1346559d70 to your computer and use it in GitHub Desktop.
Save jabez007/91efcf04d7dadfc56f33ff1346559d70 to your computer and use it in GitHub Desktop.
A Python script to upgrade all installed libraries
import pip
from subprocess import call
for dist in pip.get_installed_distributions():
print dist.project_name
ret = call('pip install --upgrade ' + dist.project_name)
#if ret != 0:
#if ret < 0:
#print " Killed by Signal: ",ret
#else:
#print "Failed to Updated: ",ret
#else:
#print " up-to-date"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment