美文网首页
Python依赖管理pipreqs

Python依赖管理pipreqs

作者: ShrJanLan | 来源:发表于2023-07-31 16:16 被阅读0次

使用pipreqs生成requeirments.txt

安装pipreqs

pip install pipreqs

生成requirements.txt文件

pipreqs . --encoding=utf8 --force

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

pip freeze > requirements.txt

生成的文件包含一些不必要的依赖项,如系统自带的库、测试工具等,检查并删除不必要的依赖项。


依赖文件

编辑器自动检测requirements.txt中的依赖,不存在会提示安装依赖。


安装依赖

相关文章

网友评论

      本文标题:Python依赖管理pipreqs

      本文链接:https://www.haomeiwen.com/subject/iyiepdtx.html