美文网首页
更优雅的生成requirements.txt

更优雅的生成requirements.txt

作者: 冰_Angus | 来源:发表于2018-10-30 20:04 被阅读0次

文章参考

pipreqs

  • 安装
pip install pipreqs 
  • 使用
pipreqs -h
pipreqs [options] <path>
  • 示例
pipreqs . --encoding utf8  --pypi-server https://pypi.douban.com/simple/
  • 提示
  • 不加 --encoding utf8 会报UnicodeDecodeError
  • 不翻墙会报 requests.exceptions.ConnectionError:
  • 作者使用过程中多加了一个django_recaptcha
  • 搜索豆瓣源 --pypi-server https://pypi.douban.com/simple/

pipdeptree

  • 安装
pip install pipdeptree
  • 使用
pipdeptree 
  • 提示
  • 并不能显示某个项目下的依赖

pip-compile

  • 安装
pip install pip-tools
  • 卸载所有包
pip-sync requirements.txt requirements.txt

emmm 把我包都卸載了 玩个鬼
想玩的自己看文档


推荐pipreqs

image.png

相关文章

网友评论

      本文标题:更优雅的生成requirements.txt

      本文链接:https://www.haomeiwen.com/subject/mwkntqtx.html