pip freeze

优质
小牛编辑
127浏览
2023-12-01

Usage

pip freeze [options]

Description

Output installed packages in requirements format.

Options

-r,--requirement<file>
  1. Generate output suitable for a requirements file.
$ pip freeze
Jinja2==2.6
Pygments==1.5
Sphinx==1.1.3
docutils==0.9.1
  1. Generate a requirements file and then install from it in another environment.
$ env1/bin/pip freeze > requirements.txt
$ env2/bin/pip install -r requirements.txt