python -m pip freeze [options]
py -m pip freeze [options]
Output installed packages in requirements format.
packages are listed in a case-insensitive sorted order.
Use the order in the given requirements file and its comments when generating output. This option can be used multiple times.
URL for finding packages, which will be added to the output.
If in a virtualenv that has global access, do not output globally-installed packages.
Only output packages installed in user-site.
Restrict to the specified installation path for listing packages (can be used multiple times).
Do not skip these packages in the output: setuptools, wheel, pip, distribute
Exclude editable package from output.
Exclude specified package from the output
Generate output suitable for a requirements file.
$ python -m pip freeze docutils==0.11 Jinja2==2.7.2 MarkupSafe==0.19 Pygments==1.6 Sphinx==1.2.2
C:\> py -m pip freeze docutils==0.11 Jinja2==2.7.2 MarkupSafe==0.19 Pygments==1.6 Sphinx==1.2.2
Generate a requirements file and then install from it in another environment.
env1/bin/python -m pip freeze > requirements.txt env2/bin/python -m pip install -r requirements.txt
env1\bin\python -m pip freeze > requirements.txt env2\bin\python -m pip install -r requirements.txt
Did this article help?
We are currently doing research to improve pip’s documentation and would love your feedback. Please email us and let us know:
What problem were you trying to solve when you came to this page?
What content was useful?
What content was not useful?