requirements.txt

requirements.txt is a file used for specifying a list of dependencies for a Python project. Typically the file is intended to be run with pip install -r requirements.txt.

There is nothing special about the name requirements.txt and any text file can be used with pip.

Pros

Cons

  • Does not specify the version of Python required for the environment.
  • May not result in reproducible environment creation without pinning of all dependencies, e.g. with pip freeze.
  • Does not separate production and development dependencies.

Learn More

Last updated on

Please submit corrections and feedback...