Any application typically has a set of dependencies that are required for that application to work. The requirements file is a way to specify and install specific set of package dependencies at once.

Use pip’s freeze command to generate a requirements.txt file for your project:

In the terminal type:

pip freeze

If you save this in requirements.txt,

pip freeze > requirements.txt

then you can install the dependencies using.

pip install -r requirements.txt