方法一 #cd 到项目跟目录然后执行 pip freeze > requirements.txt 方法二 (未检验) pip install pipreqs pipreqs /path/to/project