zoukankan      html  css  js  c++  java
  • pip命令

    原文链接地址:https://pip.pypa.io/en/latest/user_guide/

    如果python3则自带安装pip,不需要单独安装。

    • pip安装包
    $ pip install SomePackage
    [...]
    Successfully installed SomePackage
    $ pip install SomePackage            # latest version
    $ pip install SomePackage==1.0.4     # specific version
    $ pip install 'SomePackage>=1.0.4'     # minimum version
    • pip从其他地方获取包
    $ pip install SomePackage-1.0-py2.py3-none-any.whl
    [...]
    Successfully installed SomePackage
    pip install -r requirements.txt
    pip freeze > requirements.txt
    • pip显示安装的包
    $ pip show --files SomePackage
    Name: SomePackage
    Version: 1.0
    Location: /my/env/lib/pythonx.x/site-packages
    Files:
      ../somepackage/__init__.py
      [...]
    $ pip list
    docutils (0.9.1)
    Jinja2 (2.6)
    Pygments (1.5)
    Sphinx (1.1.2)
    • pip列出过时包
    $ pip list --outdated
    SomePackage (Current: 1.0 Latest: 2.0)
    • pip升级包
    $ pip install --upgrade SomePackage
    [...]
    Found existing installation: SomePackage 1.0
    Uninstalling SomePackage:
      Successfully uninstalled SomePackage
    Running setup.py install for SomePackage
    Successfully installed SomePackage
    • pip卸载包
    $ pip uninstall SomePackage
    Uninstalling SomePackage:
      /my/env/lib/pythonx.x/site-packages/somepackage
    Proceed (y/n)? y
    Successfully uninstalled SomePackage
  • 相关阅读:
    Cookies
    一个完整的upstart脚本分析
    squid总结
    python递归读取目录列表
    python删除文件
    ubuntu切割mp3文件
    TP-LINK TL-WN725N V2 / rtl8188eu Linux驱动安装
    ubuntu启动脚本
    su对环境变量做了什么
    sudoers文件配置
  • 原文地址:https://www.cnblogs.com/wuyuan2011woaini/p/10933521.html
Copyright © 2011-2022 走看看