Installation
1. Use apt to install:
sudo Install Python-pip
As of this article, APT installs PIP version 1.0, but Pip latest release is 1.5.6
$ pip--1.0 From/usr/lib/python2. 7 2.7)
PIP 1.0 Features:
$ pip-Husage:pip COMMAND [options]options:--version Show Program'S version number and exit-H,--Help Show Help-E DIR,--environment=DIR virtualenv Environment to run PIPinch(either give the interpreter or the Environment base directory)-S,--enable-site-Packages Include Site-packagesinchVirtualenvifOne is to be created. Ignoredif--environment is not used or the virtualenv already exists. -V,--verbose Give MoreOutput-Q,--quiet Give LessOutput--log=filename Logfilewhere a complete (maximum verbosity) record would be kept--proxy=proxy Specify a proxyinchThe form User:passwd@proxy. Server:port. Note that the User:[email protected] are optional and required onlyifYou is behind an authenticated proxy. If you provide [email protected]:p ort ThenYou'll be prompted fora password. --timeout=seconds,--default-timeout=SECONDS Set The socket timeout (default theseconds) Commands available:bundle:Create pybundles (archives containing multiple packages) Freeze:output all currently instal LED packages (exact versions) to stdout Help:show available commandsInstall: Install packages search:search PyPI Uninstall:uninstall packagesUnzip: Unzip Individual PackagesZip: Zip Individual Packages
View Code
2. Install with get-pip.py:
wget https://bootstrap.pypa.io/get-pip.pysudo python get-pip.py ...
3. Upgrade
sudo Install -Install -u pip
Use
1. Install the package:
Install somepackage Install somepackage==1.0. 4 Install ' somepackage>=1.0.4 ' # minimum version
1.1. Upgrade Installed Packages:
sudo install -u chardet
2. Uninstall the package:
sudo pip uninstall bottle
3. Search the package:
$ pip Search Bottle
4. List the installed package:
$ pip List
4.1. List Expired Package:
$ pip List--outdated
5. Show installed package details
$ pip Show gevent---1.0. 1 /usr/local/lib/python2. 7/dist-packagesrequires:greenlet
A concise guide to [Python] Pip