跳过正文
  1. 文章/
  2. Python/
  3. 第三方模块/

4、pipreqs

·166 字·1 分钟· loading · loading · ·
Python 第三方模块
GradyYoung
作者
GradyYoung
目录
第三方模块 - 点击查看当前系列文章
§ 4、pipreqs 「 当前文章 」

pipreqs,这个工具的好处是可以通过对项目目录扫描,将项目使用的模块进行统计,生成依赖清单即requirements.txt文件。

安装
#

pip install pipreqs

使用
#

在项目的根目录下,执行命令

pipreqs ./ --encoding=utf8 --force

#. /: 在哪个文件生成requirements.txt 文件
#--encoding=utf8 :为使用utf8编码
#--force :强制执行,当生成目录下的requirements.txt存在时覆盖 
第三方模块 - 点击查看当前系列文章
§ 4、pipreqs 「 当前文章 」