The pip command is a tool for installing and managing Python packages, such as those found in the Python Package Index. It's also a replacement for easy_install.

#
# The pip command is a tool for installing and managing Python packages, such as
# those found in the Python Package Index. It's also a replacement for easy_install.
#

# To install or upgrade pip, securely download <https://bootstrap.pypa.io/get-pip.py>,
# then run the following (which may require administrator access):
$ python get-pip.py
# See: <https://pip.pypa.io/en/latest/installing.html>

# Upgrade pip on Linux or OS X
$ pip install -U pip
# See: <https://pip.pypa.io/en/latest/installing.html>

# Upgrade pip on Windows
$ python -m pip install -U pip
# See: <https://pip.pypa.io/en/latest/installing.html>

# Search for a package
$ pip search Markdown

# Install a package
$ pip install Markdown

# Uninstall a package
$ pip uninstall Markdown

# Update an existing package
$ pip install Markdown --upgrade

# Show information about a pacakge
$ pip show Markdown

# List outdated packages
$ pip list --outdated

# Output and install packages in a requirement file
pip freeze > requirements.txt
pip install -r requirements.txt

# Upgrade all outdated packages, thanks to http://stackoverflow.com/a/3452888
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U

# Install specific version of a package
pip install -I SomePackage1==1.1.0 'SomePackage2>=1.0.4'

#
# 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.
#   zip                         DEPRECATED. Zip individual packages.
#   unzip                       DEPRECATED. Unzip individual packages.
#   bundle                      DEPRECATED. Create pybundles.
#   help                        Show help for commands.
#
# General Options:
#   -h, --help                  Show help.
#   -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-file <path>           Path to a verbose non-appending log, that only logs failures. This log is active by default at
#                               /Users/jon/.pip/pip.log.
#   --log <path>                Path to a verbose appending log. This log is inactive by default.
#   --proxy <proxy>             Specify a proxy in the form [user:passwd@]proxy.server:port.
#   --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.
#   --cert <path>               Path to alternate CA bundle.
#