好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

使用Python生成项目的requirements.txt文件

pip freeze

它生成的 requirements.txt 文件包含当前环境的完全列表,不相关的依赖包也会包含进来。

pipreqs

pip install pipreqs 
pipreqs --force <project-path> 

只会包含项目 imports 的包,包含列表不是很完全

pigar

pip install pigar 

输出信息比 pipgreqs 详细

pigar -c requirements.txt 

以上就是使用Python生成项目的requirements.txt文件的详细内容,更多请关注Gxl网其它相关文章!

查看更多关于使用Python生成项目的requirements.txt文件的详细内容...

  阅读:46次