Generate requirement.txt file You can use the following code to generate a requirements.txt file: pip install pipreqs pipreqs /path/to/project The benefits of using pipreqs from its GitHub.1 Footnotes https://stackoverflow.com/questions/31684375/automatically-create-file-requirements-txt ↩