how to get the file pip freeze > requirements.txt from a python subprocess code example
Example: pip freeze requirements.txt
$ env1/bin/pip freeze > requirements.txt
$ env2/bin/pip install -r requirements.txt
$ env1/bin/pip freeze > requirements.txt
$ env2/bin/pip install -r requirements.txt