Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import pip
  2. from subprocess import check_call
  3. import sys
  4.  
  5. project_names = {dist.project_name for dist in pip.get_installed_distributions()}
  6.  
  7. # The scipy and numpy from PyPI aren't compatible on Windows (adjust this list as needed)
  8. project_names -= {"scipy", "numpy"}
  9.  
  10. # Run this script against each of your Python distributions as desired (even 2.7)
  11. check_call(
  12. '"%s" -m pip install --upgrade %s' % (sys.executable, " ".join(project_names)),
  13. shell=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement