生成所有依赖清单 requirements.txt

 

1.  pipreqs 工具

  安装)

  

pip install pipreqs

 

  执行生成依赖列表命令)

pipreqs ./

 

python之项目依赖管理

 

 

完善版本:

pipreqs ./ --encoding=utf-8

python之项目依赖管理

 

 

使用requirements.txt自动安装所有依赖包

pip install -r requirements.txt

 

2) 导出所有的python依赖

pip freeze > requirements.txt

 

requirements.txt  说明:

-r base.txt # base.txt下面的所有包
pypinyin==0.12.0 # 指定版本(最日常的写法)
django-querycount>=0.5.0 # 大于某个版本
django-debug-toolbar>=1.3.1,<=1.3.3 # 版本范围

 

 

 

 

 
python之项目依赖管理
 

相关文章:

  • 2021-12-22
  • 2021-08-01
  • 2021-12-12
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
猜你喜欢
  • 2021-09-19
  • 2021-10-17
  • 2021-09-10
  • 2021-07-04
  • 2021-10-21
  • 2022-12-23
  • 2021-08-04
相关资源
相似解决方案