Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pip
- from subprocess import check_call
- import sys
- project_names = {dist.project_name for dist in pip.get_installed_distributions()}
- # The scipy and numpy from PyPI aren't compatible on Windows (adjust this list as needed)
- project_names -= {"scipy", "numpy"}
- # Run this script against each of your Python distributions as desired (even 2.7)
- check_call(
- '"%s" -m pip install --upgrade %s' % (sys.executable, " ".join(project_names)),
- shell=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement