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
- Simple and universally accepted in the Python community.
- Native support from pip for installing dependencies.
- Support for version pinning.
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