Mastering Python for Networking and Security
上QQ阅读APP看书,第一时间看更新

Generating the requirements.txt file

We also have the possibility to create the requirements.txt file from the project source code.

For this task, we can use the pipreqs module, whose code can be downloaded from the GitHub repository at https://github.com/bndr/pipreqs

In this way, the module can be installed either with the pip install pipreqs command or through the GitHub code repository using the python setup.py install command.

For more information about the module, you can query the official pypi page: 
https://pypi.python.org/pypi/pipreqs.

To generate the requirements.txt file, you have to execute the following command:

 pipreqs <path_project>