Created
December 24, 2019 12:15
-
-
Save e96031413/a04d030cf30655ddb345ecf57af50986 to your computer and use it in GitHub Desktop.
Upgrade all of your python packages with pip at one time.
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
#only for pip >= 10.0.1 | |
#for pip < 10.0.1, please upgrade your pip version with the following code | |
'''python -m pip install --user --upgrade pip''' | |
import pkg_resources | |
from subprocess import call | |
packages = [dist.project_name for dist in pkg_resources.working_set] | |
call("pip install --upgrade " + ' '.join(packages), shell=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment