Pip is the official package manager for Python.
upgrade single package installed: pip install -U <package>
You can also use --upgrade
Get information on an installed package: pip show <package>.
For getting the version explicity, often, showis not enough as it will also print a bunch of licensing etc.
Rather, use: pip show numpy | grep Versionon Linux to crawl for versioning explicitly.
Find outdated packages: pip list --outdated
Upgrade all packages locally installed:
pip list --format=freeze | awk -F '==' '{print $1}' | xargs pip install --upgrade
requirements.txt
One can generate the list for requirements.txt, by using pip freeze > requirements.txt
Install the packages in the requirements.txt : pip install -r requirements.txt