Python installs new packages, pip is a very useful installation tool.
pip list can query all installed packages and versions. How do I know whether there is a new version of the local installation package that can be updated? It can be achieved through the pip list function. The specific implementation is as follows:
pip list --outdated --format=legacy
pip list --outdated --format=columns ##Contrast format=legacy,format=The output format of columns is similar to that of a table.
Through the above method, you can obtain the current version of the currently installed package, the latest version and the package installation file format (wheel/sdist)
So how do you update these packages?
The first method: pip install -Uxxxx (xxxx refers to the name of the package, the disadvantage of this method is that the package needs to be updated one by one)
The second way: pip-review function
pip install pip-review
pip-review --local --interactive
Knowledge point expansion:
Python package update method
I haven't fiddled with the old notebook for a long time. I turned it on today and found that the python version is very low. Almost all packages need to be updated. So, take the opportunity to organize the python package update method:
Need special explanation, under linux system, commands need to bring sudo to use super user authority.
Update the current pip first, because the pip package is needed for the next update
Or python -m pip install --upgrade pip
The test has not been successful yet
So far this article on how to update the python package is introduced. For more relevant python update package steps, please search for the previous articles of ZaLou.Cn or continue to browse the related articles below. Hope you will support ZaLou.Cn in the future!
Recommended Posts