最近写完的自动化脚本,分享给同事的时候发现依赖包很难解决(使用的不是virtualenv环境)。想起来之前看开源接口平台项目的时候可以一键下载依赖包,于是就找到了第三方包pipreqs,可以自动帮助我们自动生成requirements.txt
- github原文介绍:pipreqs-根据任何项目的导入生成pip requirements.txt文件
- 链接:https://github.com/bndr/pipreqs
第一步:下载pipreqs工具包(pip install pipreqs)
Microsoft Windows [版本 10.0.17134.1069]
(c) 2018 Microsoft Corporation。保留所有权利。
C:\Users\wy.DESKTOP-KENPKKP\Desktop\Dingda\dingAPI>pip install pipreqs
Collecting pipreqs
Downloading https://files.pythonhosted.org/packages/f8/8d/2e7c15bc5fcab54f9c5b404b5668fdac65f5e3224b2116097fae1299fc98/pipreqs
-0.4.9-py2.py3-none-any.whl
Collecting docopt
Downloading https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-
0.6.2.tar.gz
Collecting yarg
Downloading https://files.pythonhosted.org/packages/8b/