xxxxxxxxxx
# For pip >= 10.0.1
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)
xxxxxxxxxx
# Open your command shell and enter the below command. This will upgrade all packages system-wide to the latest or newer version available in the Python Package Index (PyPI)
pip freeze | %{$_.split('==')[0]} | %{pip install --upgrade $_}
#outputs the list of installed packages
pip freeze > requirements.txt
#updates all packages
pip install -r requirements.txt --upgrade
xxxxxxxxxx
pip list --outdated --format=freeze | %{$_.split('==')[0]} | %{pip install --upgrade $_}
xxxxxxxxxx
pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
xxxxxxxxxx
pip freeze | %{$_.split('==')[0]} | %{pip install --upgrade $_}
xxxxxxxxxx
pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
xxxxxxxxxx
pip --disable-pip-version-check list --outdated --format=json | python -c "import json, sys; print('\n'.join([x['name'] for x in json.load(sys.stdin)]))"