pip / docs / requirement-format.txt

The requirements file format

The requirements file is a way to get pip to install specific packages
to make up an *environment*.  This document describes that format.  To
read about *when* you should use requirement files, see `Requirements
Files <./#requirements-files>`_.

Each line of the requirements file indicates something to be
installed.  For example::


tells pip to install the 3.0 version of MyPackage.  

You can also install a package in an "editable" form.  This puts the
source code into ``src/distname`` (making the name lower case) and
runs ``python develop`` on the package.  To indicate
editable, use ``-e``, like::

    -e svn+

The ``#egg=MyProject`` part is important, because while you can
install simply given the svn location, the project name is useful in
other places.

If you need to give pip (and by association easy_install) hints
about where to find a package, you can use the ``-f``
(``--find-links``) option, like::


If the package is named like ``PackageName-Version.tar.gz`` (or a zip)
then you don't need ``#egg=...``.  Note that you cannot provide
multiple ``-f`` arguments to easy_install, but you can in a
requirements file (they all get concatenated into a single ``-f`` for

Version Control

Right now pip knows of the following major version control systems:


Pip supports the URL schemes ``svn``, ``svn+http``, ``svn+https``, ``svn+ssh``.
You can also give specific revisions to an SVN URL, like::

    -e svn+

which will check out revision 2019.  ``@{20080101}`` would also check
out the revision from 2008-01-01. You can only check out specific
revisions using ``-e svn+...``.


Pip currently supports cloning over ``git``, ``git+http`` and ``git+ssh``::

    -e git://
    -e git+
    -e git+ssh://

Passing branch names, a commit hash or a tag name is also possible:: 

    -e git://
    -e git://
    -e git://


The supported schemes are: ``hg+http``, ``hg+https``,
``hg+static-http`` and ``hg+ssh``::

    -e hg+
    -e hg+
    -e hg+ssh://

You can also specify a revision number, a revision hash, a tag name or a local
branch name::

    -e hg+
    -e hg+
    -e hg+
    -e hg+


Pip supports Bazaar using the ``bzr+http``, ``bzr+https``, ``bzr+ssh``,
``bzr+sftp`` and ``bzr+ftp`` schemes::

    -e bzr+
    -e bzr+s
    -e bzr+ssh://
    -e bzr+

Tags or revisions can be installed like this::

    -e bzr+
    -e bzr+

Recursive Requirements

If you wish, you can also refer to other requirements files, like::

    -r Pylons-requirements.txt

This gives you a way of abstracting out sets of requirements.  This
isn't, however, very friendly with `frozen requirements
<./#freezing-requirements>`_, as everything in
``Pylons-requirements.txt`` will show up in your frozen file.

Indexes, find-links

You can also provide values for the ``--index`` and ``--find-links``
options in your requirement files, like::


Note that using ``--index`` removes the use of `PyPI
<>`_, while using ``--extra-index`` will add
additional indexes.

``--find-links`` is more ad-hoc; instead of a complete "index", you
only need an HTML page of links to available packages.  Simply by
putting all your private packages in a directory and using the Apache
auto-index, you can publish your packages so pip can find them.
``--find-links`` is always additive; pip looks at everything it can
find.  Use it like::


Note that all these options must be on a line of their own.