The requirements.txt file it generates contains a complete list of the current environment, including irrelevant dependency packages.
pip install pipreqs
pipreqs --force <project-path>
Only contains packages of project imports, the inclusion list is not very complete
pip install pigar
The output information is more detailed than pipgreqs
pigar -c requirements.txt
The above is the detailed content of Use Python to generate the project's requirements.txt file. For more information, please follow other related articles on the PHP Chinese website!