使用freeze命令存在一个问题,生成的requirements.txt文件保存了当前Python环境下所有类库包,而pipreqs只包含当前项目下使用到的类库
使用方法:
1. pip3 install pipreqs
2.pipreqs .
安装所需类库内容执行pip3 install -r requirements.txt即可
python 生成requirements.txt文件
原文:https://www.cnblogs.com/shining5/p/12606561.html