Auto generate requirements file using pip freeze or pipreqs. pipreqs used to generate requirements.txt file for python projects based on imports
Read this post on idiotinside.com