for flask

$ pip freeze > requirements.txt

Here is what the above code is Doing:
1. We’re creating a requirements.txt file in the current directory.
2. We’re running pip freeze, which outputs a list of all the packages installed in the current virtual environment.
3. We’re redirecting the output of pip freeze into requirements.txt.