zoukankan      html  css  js  c++  java
  • pip安装使用详解【转】

    转自:pip安装使用详解 – 运维生存时间
    http://www.ttlsa.com/python/how-to-install-and-use-pip-ttlsa/

    pip类似RedHat里面的yum,安装Python包非常方便。本节详细介绍pip的安装、以及使用方法。

    1、pip下载安装

    1.1 pip下载

    1.2 pip安装

    2. pip使用详解

    2.1 pip安装包

    2.2 pip查看已安装的包

    2.3 pip检查哪些包需要更新

    2.4 pip升级包

    2.5 pip卸载包

    3. pip使用实例

    3.1 安装redis

    3.2 卸载redis

    3.3 查看待更新包

    4. 常见错误

    4.1 ImportError No module named setuptools
    请参考《ImportError No module named setuptools解决

    5. pip参数解释

    # pip --help
     
    Usage:   
      pip <command> [options]
     
    Commands:
      install                     安装包.
      uninstall                   卸载包.
      freeze                      按着一定格式输出已安装包列表
      list                        列出已安装包.
      show                        显示包详细信息.
      search                      搜索包,类似yum里的search.
      wheel                       Build wheels from your requirements.
      zip                         不推荐. Zip individual packages.
      unzip                       不推荐. Unzip individual packages.
      bundle                      不推荐. Create pybundles.
      help                        当前帮助.
     
    General Options:
      -h, --help                  显示帮助.
      -v, --verbose               更多的输出,最多可以使用3次
      -V, --version               现实版本信息然后退出.
      -q, --quiet                 最少的输出.
      --log-file <path>           覆盖的方式记录verbose错误日志,默认文件:/root/.pip/pip.log
      --log <path>                不覆盖记录verbose输出的日志.
      --proxy <proxy>             Specify a proxy in the form [user:passwd@]proxy.server:port.
      --timeout <sec>             连接超时时间 (默认15秒).
      --exists-action <action>    Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup.
      --cert <path>               证书.

    6、使用yum安装pip

    首先安装epel扩展源:

    sudo yum -y install epel-release
    
    yum install python-pip

    6. 结束

  • 相关阅读:
    SpringCloud学习笔记(3)----Spring Cloud Netflix之深入理解Eureka
    SpringCloud学习笔记(2)----Spring Cloud Netflix之Eureka的使用
    SpringCloud学习笔记(1)----认识微服务与SpringCloud
    SpringBoot学习笔记(16)----SpringBoot整合Swagger2
    SpringBoot学习笔记(15)----SpringBoot使用Druid
    SpringBoot学习笔记(14)----应用监控-HTTP方式
    SpringBoot学习笔记(13)----使用Spring Session+redis实现一个简单的集群
    SpringBoot学习笔记(12)----SpringBoot实现多个 账号轮询发送邮件
    SpringBoot学习笔记(11)-----SpringBoot中使用rabbitmq,activemq消息队列和rest服务的调用
    SpringBoot学习笔记(8)-----SpringBoot文件上传
  • 原文地址:https://www.cnblogs.com/paul8339/p/7131165.html
Copyright © 2011-2022 走看看