1// capture requirements to install
2pip freeze > requirements.txt
3
4// install requirements from requirements.txt
5pip install -r requirements.txt
6
7// or
8$ env1/bin/pip freeze > requirements.txt
9$ env2/bin/pip install -r requirements.txt
1For Unix families: pip3 freeze > requirements.txt
2For Windos: pip freeze > requirements.txt
1# Python3 code to generate the
2# random id using uuid1()
3
4import uuid
5
6# Printing random id using uuid1()
7print ("The random id using uuid1() is : ",end="")
8print (uuid.uuid1())
1# First:
2pip install pipreqs
3
4# Then:
5pipreqs path/to/project
6
7# There is now a requirements.txt file in the project folder.