Skip to content

Instantly share code, notes, and snippets.

@dcramer dcramer/gist:6568624

Created Sep 15, 2013
What would you like to do?
$ pip install --help
pip install [options] <requirement specifier> ...
pip install [options] -r <requirements file> ...
pip install [options] [-e] <vcs project url> ...
pip install [options] [-e] <local project path> ...
pip install [options] <archive url/path> ...
Install packages from:
- PyPI (and other indexes) using requirement specifiers.
- VCS project urls.
- Local project directories.
- Local or remote source archives.
pip also supports installing from "requirements files", which provide
an easy way to specify a whole environment to be installed.
See for details on VCS url formats and
requirements files.
Install Options:
-e, --editable <path/url> Install a project in editable mode (i.e. setuptools "develop mode") from a local project path or
a VCS url.
-r, --requirement <file> Install from the given requirements file. This option can be used multiple times.
-b, --build <dir> Directory to unpack packages into and build in. The default in a virtualenv is "<venv
path>/build". The default for global installs is "<OS temp dir>/pip_build_<username>".
-t, --target <dir> Install packages into <dir>.
-d, --download <dir> Download packages into <dir> instead of installing them, regardless of what's already installed.
--download-cache <dir> Cache downloaded packages in <dir>.
--src <dir> Directory to check out editable projects into. The default in a virtualenv is "<venv path>/src".
The default for global installs is "<current dir>/src".
-U, --upgrade Upgrade all packages to the newest available version. This process is recursive regardless of
whether a dependency is already satisfied.
--force-reinstall When upgrading, reinstall all packages even if they are already up-to-date.
-I, --ignore-installed Ignore the installed packages (reinstalling instead).
--no-deps Don't install package dependencies.
--no-install Download and unpack all packages, but don't actually install them.
--no-download Don't download any packages, just install the ones already downloaded (completes an install run
with --no-install).
--install-option <options> Extra arguments to be supplied to the install command (use like --install-option
="--install-scripts=/usr/local/bin"). Use multiple --install-option options to pass multiple
options to install. If you are using an option with a directory path, be sure to use
absolute path.
--global-option <options> Extra global options to be supplied to the call before the install command.
--user Install using the user scheme.
--egg Install as self contained egg file, like easy_install does.
--root <dir> Install everything relative to this alternate root directory.
--use-wheel Find and prefer wheel archives when searching indexes and find-links locations. Default to
accepting source archives.
--pre Include pre-release and development versions. By default, pip only finds stable versions.
--no-clean Don't clean up build directories.
Package Index Options:
-i, --index-url <url> Base URL of Python Package Index (default
--extra-index-url <url> Extra URLs of package indexes to use in addition to --index-url.
--no-index Ignore package index (only looking at --find-links URLs instead).
-f, --find-links <url> If a url or path to an html file, then parse for links to archives. If a local path or file://
url that's a directory, then look for archives in the directory listing.
-M, --use-mirrors Use the PyPI mirrors as a fallback in case the main index is down.
--mirrors <url> Specific mirror URLs to query when --use-mirrors is used.
--allow-external <package> Allow the installation of externally hosted files
--allow-all-external Allow the installation of all externally hosted files
--no-allow-external Disallow the installation of all externally hosted files
--allow-insecure <package> Allow the installation of insecure and unverifiable files
--no-allow-insecure Disallow the installation of insecure and unverifiable files
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> Log file where a complete (maximum verbosity) record will be kept.
--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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.