pip命令使用详解「建议收藏」

pip命令使用详解「建议收藏」pip很像CentOS系统中的yum命令,用于安装及维护Python包。pip的安装windows其实在windows下是默认安装了pip工具的,只是没有将其所在目录加入Path,导致命令查找不到。将python安装目录下的scripts目录加入环境变量Path中即可。Linux执行下面命令即可完成安装#wgethttps://bootstrap.pyp…

大家好,又见面了,我是你们的朋友全栈君。

pip很像CentOS系统中的yum命令,用于安装及维护Python包。

pip的安装

windows

其实在windows下是默认安装了pip工具的,只是没有将其所在目录加入Path,导致命令查找不到。
这里写图片描述
这里写图片描述
将python安装目录下的scripts目录加入环境变量Path中即可。

Linux

执行下面命令即可完成安装

# wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
# python get-pip.py

pip使用

安装包

pip install package_name

查看某个已安装包

pip show --files package_name

检查哪些包需要更新

pip list --outdated

升级包

pip install --upgrade package_name

卸载包

pip uninstall package_name

使用pip –help命令可以查看pip帮助手册

# pip --help

Usage:
  pip <command> [options]

Commands:
  install                     Install packages.  安装包
  download                    Download packages. 下载包
  uninstall                   Uninstall packages. 卸载包
  freeze                      Output installed packages in requirements format. 按着一定格式输出已安装包列表
  list                        List installed packages. 列出已安装包
  show                        Show information about installed packages. 显示包详细信息
  check                       Verify installed packages have compatible dependencies.检查包的依赖关系是否完整
  config                      Manage local and global configuration.管理配置
  search                      Search PyPI for packages.搜索包
  wheel                       Build wheels from your requirements.
  hash                        Compute hashes of package archives.计算包的hash值 
  completion                  A helper command used for command completion.
  help                        Show help for commands.

General Options:
  -h, --help Show help.   --isolated Run pip in an isolated mode, ignoring environment variables and user configuration.   -v, --verbose Give more output. Option is additive, and can be used up to 3 times.   -V, --version Show version and exit.   -q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).   --log <path> Path to a verbose appending log.   --proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.   --retries <retries> Maximum number of retries each connection should attempt (default 5 times).   --timeout <sec> Set the socket timeout (default 15 seconds).   --exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort).   --trusted-host <hostname> Mark this host as trusted, even though it does not have valid or any HTTPS.   --cert <path> Path to alternate CA bundle.   --client-cert <path> Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.   --cache-dir <dir> Store the cache data in <dir>.   --no-cache-dir Disable the cache.   --disable-pip-version-check                               Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.
  --no-color Suppress colored output
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/139952.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)
blank

相关推荐

  • sprintf()函数的用法总结

    sprintf()函数的用法总结sprintf()函数的程序用例:#include#includeintmain(void){charbuffer[80];sprintf(buffer,”AnapproximationofPiis%f\n”,M_PI);puts(buffer);return0;}sprintf的作用是将一个格式化的字符串输出到一个

  • Databus Relays

    Databus Relays概述DatabusRelays主要负责以下两个工作:从databus源数据库中读取变化行,并序列化为事件流保存至内存中;接受客户端的请求,并将数据变化事件流返回给客户端。技术架构 EventProducer:用来读取数据库的变化事件,转化为AVRO类型并存储至内存中;CircularBuffer:Relay有一个或多个环形的缓冲池用来保存按递增

    2022年10月16日
  • suse linux rpm 安装

    suse linux rpm 安装安装rpm包时遇到error:Faileddependencies:错误在linux下安装rpm包时经常会遇到下面这个问题:error:Faileddependencies:……………………………………………..省略号表示安装此rpm缺少的包。遇到此问题时可以在安装rpm包命令的后面加两个参数,如:

  • 【工具使用】SecureCRT的下载、安装图文详细过程介绍[通俗易懂]

    【工具使用】SecureCRT的下载、安装图文详细过程介绍[通俗易懂]本文目录一、SecureCRT的介绍二、SecureCRT的下载三、SecureCRT的安装四、SecureCRT的使用一、SecureCRT的介绍SecureCRT是一款支持SSH(SSH1和SSH2)的终端仿真程序,简单地说是Windows下登录UNIX或Linux服务器主机的软件。SecureCRT支持SSH,同时支持Telnet和rlogin协议。SecureCRT是一款用于连接运行包括Windows、UNIX和VMS的理想工具。通过使用内含的VC

  • 机房重构——数据库

    机房重构——数据库机房重构——数据库

  • android listview 滚动到底部

    android listview 滚动到底部androidlistview滚动到底部,亲试有效:listView.setSelection(ListView.FOCUS_DOWN);//刷新到底部。注意:调用完了,不要调用listView.invalidateViews();

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号