What does the “-U” option stand for in pip install -U

断了今生、忘了曾经 提交于 2020-07-31 06:19:47

问题


Despite a ton of Googling, I can't find any docs for pip's command line options/arguments. What does pip install -U mean? Does anyone have a link to a list of pip's options and arguments?


回答1:


Type pip install -h to list help:

-U, --upgrade Upgrade all packages to the newest available version

So, if you already have a package installed, it will upgrade the package for you. Without the -U switch it'll tell you the package is already installed and exit.

Each pip subcommand has its own help listing. pip -h shows you overall help, and pip [subcommand] -h gives you help for that sub command, such as install.

You can also find the full reference documentation online; the General Options section covers switches available for every pip subcommand, while each subcommand has a separate Options section to cover subcommand-specific switches; see the pip install options section, for example.



来源:https://stackoverflow.com/questions/12435209/what-does-the-u-option-stand-for-in-pip-install-u

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!