pip upgrade all
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)
-----
pip install -U $(pip freeze | awk '{split($0, a, "=="); print a[1]}')
----
pip freeze > pip_frozen.txt pip install -r pip_frozen.txt --upgrade
评论
发表评论