pip freeze

使い方


pip freeze [options]

説明

Output installed packages in requirements format.

packages are listed in a case-insensitive sorted order.

オプション

-r, --requirement <file>

Use the order in the given requirements file and its comments when generating output. This option can be used multiple times.

-f, --find-links <url>

URL for finding packages, which will be added to the output.

-l, --local

If in a virtualenv that has global access, do not output globally-installed packages.

--user

Only output packages installed in user-site.

--all

Do not skip these packages in the output: pip, setuptools, distribute, wheel

  1. requirementsファイルに適した出力を生成します。

    $ pip freeze
    docutils==0.11
    Jinja2==2.7.2
    MarkupSafe==0.19
    Pygments==1.6
    Sphinx==1.2.2
    
  2. requirementsファイルを生成し、別の環境でそれからインストールします。

    $ env1/bin/pip freeze > requirements.txt
    $ env2/bin/pip install -r requirements.txt