Skip to content

Instantly share code, notes, and snippets.

@realmahdi
Created May 13, 2018 08:40
Show Gist options
  • Save realmahdi/84d91585cb802b40d856c4806bdf2842 to your computer and use it in GitHub Desktop.
Save realmahdi/84d91585cb802b40d856c4806bdf2842 to your computer and use it in GitHub Desktop.
simple script for update all pip package
import os
os.system("pip freeze > /tmp/list.txt")
file = open('/tmp/list.txt')
os.system("pip install --upgrade pip")
for i in file:
x = i.split('==')[0]
cmd = "pip install --upgrade "+x
os.system(cmd)
os.system("pip freeze > /tmp/Nlist.txt")
print("Done")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment