Created
February 16, 2018 03:03
-
-
Save jabez007/91efcf04d7dadfc56f33ff1346559d70 to your computer and use it in GitHub Desktop.
A Python script to upgrade all installed libraries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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