安装包

  1. pip install package_name

查看某个已安装包

  1. pip show --files package_name

显示包所在目录

  1. pip show -f <包名>

检查哪些包需要更新

  1. pip list --outdated

升级包

  1. pip install --upgrade package_name
  2. pip install -U <包名>
  3. pip install --upgrade pip #升级pip工具

卸载包

  1. pip uninstall package_name
  1. # pip --help
  2. Usage:
  3. pip <command> [options]
  4. Commands:
  5. install 安装包
  6. download 下载包
  7. uninstall 卸载包
  8. freeze 按着一定格式输出已安装包列表
  9. list 列出已安装包
  10. show 显示包详细信息
  11. check 检查包的依赖关系是否完整
  12. config 管理配置
  13. search 搜索包
  14. wheel Build wheels from your requirements.
  15. hash 计算包的hash
  16. completion A helper command used for command completion.
  17. help Show help for commands.
  18. General Options:
  19. -h, --help 显示帮助
  20. -v, --verbose 更多的输出,最多可以使用3
  21. -V, --version 显示版本信息然后退出
  22. -q, --quiet 最少的输出
  23. --log <path> 不覆盖记录verbose输出日志
  24. --proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.
  25. --retries <retries> Maximum number of retries each connection should attempt (default 5 times).
  26. --timeout <sec> 连接超时时间(默认15秒)
  27. --cert <path> 证书