Last active
October 7, 2018 15:19
-
-
Save MOOOWOOO/81fd785c3d3dcf6e0c11 to your computer and use it in GitHub Desktop.
pip-upgrade
This file contains 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
#!/usr/bin/python | |
# -*- coding:utf-8 -*- | |
import pip | |
from subprocess import call | |
for dist in pip.get_installed_distributions(): | |
call("pip2 install --upgrade {}".format(dist.project_name), shell=True) |
This file contains 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
#!/usr/bin/python3 | |
# -*- coding:utf-8 -*- | |
from pip._internal.utils.misc import get_installed_distributions | |
from subprocess import call | |
for dist in get_installed_distributions(): | |
call("pip3 install --upgrade {}".format(dist.project_name), shell=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment