码迷,mamicode.com
首页 > 其他好文 > 详细

pip笔记(译)

时间:2017-02-19 14:01:36      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:code   existing   packages   安装   current   setup.py   显示   ade   show   

 

从PyPI中安装包

>>> pip install SomePackage
    [...]
    Successfully installed SomePackage

从PyPI或其他地方安装下载的包

>>> pip install SomePackage-1.0-py2.py3-none-any.whl
    [...]
    Successfully installed SomePackage

显示已安装的文件:

>>> pip show --files SomePackage
    Name: SomePackage
    Version: 1.0
    Location: /my/env/lib/pythonx.x/site-packages
    Files:
      ../somepackage/__init__.py
[...]

列出已过时的包信息:

>>> pip list --outdated
    SomePackage (Current: 1.0 Latest: 2.0)

更新包:

>>> 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 uninstall SomePackage
    Uninstalling SomePackage:
      /my/env/lib/pythonx.x/site-packages/somepackage
    Proceed (y/n)? y
    Successfully uninstalled SomePackage

 

pip笔记(译)

标签:code   existing   packages   安装   current   setup.py   显示   ade   show   

原文地址:http://www.cnblogs.com/yl153/p/6415452.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!