人走茶凉|Python学习点滴03 - 学会使用pip命令( 四 )

Maximum number of retries each connection shouldattempt (default 5 times).--timeoutSet the socket timeout (default 15 seconds).--exists-actionDefault action when a path already exists: (s)witch,(i)gnore, (w)ipe, (b)ackup, (a)bort.--trusted-hostMark this host or host:port pair as trusted, eventhough it does not have valid or any HTTPS.--certPath to alternate CA bundle.--client-certPath to SSL client certificate, a single filecontaining the private key and the certificate in PEMformat.--cache-dir

Store the cache data in .--no-cache-dirDisable the cache.--disable-pip-version-checkDon't periodically check PyPI to determine whether anew version of pip is available for download. Impliedwith --no-index.--no-colorSuppress colored output--no-python-version-warningSilence deprecation warnings for upcoming unsupportedPythons.4.2 查看pip指定命令的详细描述一、描述:可以通过pip help 命令来查看指定命令的的详细描述(用法、描述、常用选项) 。
二、语法:
pip help 三、示例:以通过pip help help命令来查看pip help的详细描述(用法、描述、常用选项)为例
C:\>pip help helpUsage:pip help Description:Show help for commandsGeneral Options:-h, --helpShow help.--isolatedRun pip in an isolated mode, ignoring environment variables and user configuration.-v, --verboseGive more output. Option is additive, and can be used up to 3 times.-V, --versionShow version and exit.-q, --quietGive less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).--logPath to a verbose appending log.--proxySpecify a proxy in the form [user:passwd@]proxy.server:port.--retries Maximum number of retries each connection should attempt (default 5 times).--timeoutSet the socket timeout (default 15 seconds).--exists-actionDefault action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.--trusted-hostMark this host or host:port pair as trusted, even though it does not have valid or any HTTPS.--certPath to alternate CA bundle.--client-certPath to SSL client certificate, a single file containing the private key and the certificate in PEM format.--cache-dir Store the cache data in .--no-cache-dirDisable the cache.--disable-pip-version-checkDon't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.--no-colorSuppress colored output--no-python-version-warningSilence deprecation warnings for upcoming unsupported Pythons.4.3 安装最新版本的软件包一、描述:
可以通过pip install命令来安装指定的Python第三方软件包(最新版本) 。
二、语法:
# 语法1: 进行全局安装 pip install# 语法2: 仅进行该用户安装(以下--user选项两种放置位置的效果一样) pip install--user pip install --user注1:pip安装时会计算该软件包的依赖包 , 如果没有冲突 , 会一并将该依赖包也一起安装了 。
注2:上述语法1中不含--user选项:表示进行全局安装 , 安装后本机所有用户均可使用该软件包 。 上述语法2中增加--user选项:表示仅进行该用户安装 , 安装后本机仅有该用户可使用该软件包 。


推荐阅读