"-U"代表什么? pip install -U中的选项代表 [英] What does the "-U" option stand for in pip install -U
问题描述
尽管有很多Google搜索,但我找不到pip命令行选项/参数的任何文档. pip install -U
是什么意思?没有人有指向pip选项和参数列表的链接吗?
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?
推荐答案
键入pip install -h
列出帮助:
-U,--upgrade将所有软件包升级到最新的可用版本
-U, --upgrade Upgrade all packages to the newest available version
因此,如果您已经已安装软件包,它将为您升级该软件包.如果没有-U开关,它将告诉您该软件包已安装并退出.
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.
每个pip
子命令都有其自己的帮助列表. pip -h
向您显示总体帮助,而pip [subcommand] -h
为该子命令(例如install
)提供帮助.
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
.
您还可以在线找到完整的参考文档; 常规选项部分涵盖每个pip
子命令可用的开关,而每个子命令都有单独的 Options 部分,以涵盖特定于子命令的开关;请参见 pip 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.
这篇关于"-U"代表什么? pip install -U中的选项代表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!