pipreqs

1
pip install pipreqs

在python项目的根目录下 使用 pipreqs ./

1
2
pipreqs ./ --encoding=utf8
INFO: Successfully saved requirements file in ./requirements.txt