You can view the list of installed packages with pip list
or pip freeze
. However, if you add an option, you can also display a list of updatable packages and a list of the latest packages.
This is convenient if you want to update installed packages in bulk.
A long time ago, I had to use the pip-review
command of pip-tools, so it's convenient to be able to do it with the pip option.
** List of updatable packages **
$ pip list -o
google-api-python-client (1.5.0) - Latest: 1.5.1 [wheel]
Pillow (3.1.1) - Latest: 3.2.0 [sdist]
pytz (2015.7) - Latest: 2016.4 [wheel]
Options are -o
or --outdated
.
** Latest package list **
$ pip list -u
pip (8.1.2)
ujson (1.35)
wheel (0.29.0)
Options are -u
or --uptodate
.
If everything is up to date and there is no problem, the following is OK.
$ pip list -o | awk '{print $1}' | xargs pip install -U
Recommended Posts