为Python项目生成requirements 参考博客 使用pip导出当前项目依赖的包。 # 1. 安装pipreqs pip install pipreqs # 2. 在项目根目录,执行 pipreqs . --encoding=utf8 --force