I know that there is a lot of information about this topic available in internet, but how of those examples really work?
TLDR:
install pipreqs
python3 -m pipreqs.pipreqs --encoding utf-8 --force /home/path/to/project
It should create requirements.txt file
To install requirements use following command
pip3 install -r requirements.txt