pip does not support the current built-in command to upgrade all installed Python modules.
Lists currently installed package:
List of upgradeable packages:
Upgrade a package:
import pip from subprocess import call for dist in pip.get_installed_distributions(): call("pip install --upgrade " + dist.project_name, shell=True)
Scripted 2:
import re
import os
pak_re = re.compile(r'[a-zA-Z0-9]+[-]*[a-zA-Z0-9]*')
print ( "Getting list of packages need to be upgraded, you need to network, it may take a little time.")
pak_list = os.popen("pip list -o").readlines()
print ( "acquired all packages need to be upgraded, total", str (len (pak_list)), "one, please be patient")
for i in range(len(pak_list)):
pak_list[i] = pak_re.search(pak_list[i])[0] + os.linesep
count = 1
for i in pak_list:
os.system("pip install --upgrade " + i)
print ( "first" + str (count) + "upgrade is complete packets")
count += 1
print ( "Congratulations! All upgrades done!")
pip install pip-review
pip-review --local --interactive