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

posted @ 2018-05-21 11:35  noube  阅读(1760)  评论(0编辑  收藏  举报