There's more...
If any of the modules need to be changed to a different version because a new version is available, change it using requirements and run the install command again:
$ pip install -r requirements.txt
This is also applicable when a new module needs to be included.
At any point, the freeze command can be used to display all installed modules. freeze returns the modules in a format compatible with requirements.txt, making it possible to do this to generate a file with our current environment:
$ pip freeze > requirements.txt
This will include dependencies, so expect a lot more modules in the file.
In some cases, installing packages may require additional tools, such as compilers or a specific library that supports some functionality (for example, a particular database driver). If that's the case, the documentation will normally explain the dependencies.