using pip
Use pip list
to list installed packages.
Use pip list --outdated --format=freeze
to list outdated installed packages using the freeze list format.
explanation
- The
--outdated
option lists outdated packages. - The
--format=freeze
option produces output that can be used with a requirements file.1
Use sudo -H pip install --upgrade pip
to upgrade pip to the newest version.
Note
- foobar represents the name of a package.
Use sudo -H pip install --upgrade foobar
to upgrade an installed package to the newest version.
explanation
The --upgrade
option upgrades the package to the newest version.
Use sudo -H pip uninstall foobar
to uninstall a package.
Use sudo -H pip uninstall pip
to uninstall pip.
licensing
No rights reserved: CC0 1.0.
prior work
- The meaning of the word “freeze” in the contect of the
--format=freeze
option was introduced to me by an answer on Stack Overflow by Serjik and an answer on Stack Overflow by Daniel Lahyani. - The method of uninstalling a package with
uninstall
was introduced to me by an answer on Stack Overflow by The Dead Mayan. - The method of uninstalling pip was introduced to me by a comment on GitHub by CyberMew.
- The method of upgrading an installed package was introduced to me by an answer on Stack Overflow by rbp.
-
http://staticbackup.readthedocs.com/pip/rtd-builds/latest/usage.html#id11 ↩