python项目生成requirements.txt

本文最后更新于 2025年4月21日 上午

导出当前环境所有依赖

pip freeze > requirements.txt

但这些不一定都是当前项目必需的包,更好的方法是下面这种

导出当前目录项目的依赖

pip install pipreqs
pipreqs . --encoding=utf8 --force


python项目生成requirements.txt
http://example.com/2021/06/26/python项目生成requirements-txt/
作者
xinhaojin
发布于
2021年6月26日
许可协议