码迷,mamicode.com
首页 > 系统相关 > 详细

Linux 包管理工具 pip 使用详解

时间:2015-08-20 18:23:37      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:

1. pip install 安装软件

[example@admin ~]$ pip install somepackage
[...]
Successfully installed somepackage

参数:
--upgrade 升级某包

 2. pip show 查看已安装的软件(以matplotlib为例子)

[example@admin ~]$ pip show matplotlib
---
Metadata-Version: 1.1
Name: matplotlib
Version: 1.4.3
Summary: Python plotting package
Home-page: http://matplotlib.org
Author: John D. Hunter, Michael Droettboom
Author-email: mdroe@stsci.edu
License: BSD
Location: /usr/local/lib/python3.4/site-packages
Requires: numpy, six, python-dateutil, pytz, pyparsing, nose, nose

参数:
--files 列出文件地址

 3. pip list 列出现有软件

[example@admin ~]$ pip list
matplotlib (1.4.3)
nose (1.3.7)
numpy (1.9.2)
[...]
Name (Version)

参数:
--outdated 需要更新的软件

4. pip uninstall 卸载某软件

[example@admin ~] pip uninstall somepackage
Uninstalling somepackage:
/my/env/lib/pythonx.x/site-packages/somepackage
Proceed (y/n)? y
Successfully uninstalled somepackage

 5. pip --help 帮助

[example@admin ~] pip --help

Usage:
  pip <command> [options]

Commands:
  install                     Install packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  search                      Search PyPI for packages.
  wheel                       Build wheels from your requirements.
  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.
  --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.
  --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.

 

 

 

 


参考资料:linux中pip安装步骤和使用详解

Linux 包管理工具 pip 使用详解

标签:

原文地址:http://www.cnblogs.com/magisquare/p/4745799.html

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