Ubuntu 下生成 python 环境安装文件 requirements.txt

参考:

Ubuntu 下生成 python 环境安装文件 requirements.txt

首先通过 pip 安装pyreqs模块:

pip install pipreqs

然后进入 python 源码所在的目录下,执行:

pipreqs ./

该命令在当前目录下生成 requirements.txt

如果需要在一个新的环境下重新安装源码需要的依赖包,只需执行:

pip install -r requirements.txt

2018.9

posted @ 2018-09-08 20:01  Wasdns  阅读(2014)  评论(0编辑  收藏  举报