引子
写了个python工具,其中用了一些依赖,不想要手动整理依赖放到requests.txt中。俺想到肯定有懒人用法,于是有了今天的文章。使用pipreqs来管理
安装
pip install pipreqs
用法
一步搞定
pipreqs /path/to/project
这样就生成了一个requirements.txt啦
通过requirements.txt安装依赖
pip install -r requirements.txt
参考
id:: 66264e12-b7c5-48bc-b37b-d0fbd31330f0) python生成requirements.txt的两种方法 数据驱动 博客园