Python使用requirements.txt安装类库

requirements.txt文件生成

1.pip freeze > requirements.txt

  此方法将导出当前环境下,Python安装的所有类库

2.pip install pipreqs $ pipreqs /path/to/project

  只导出当前项目下用到的类库

使用requirements.txt安装类库

pip  install -r requirements.txt

原文地址:https://www.cnblogs.com/noube/p/9066392.html