首页 > 编程语言 >python生成requirements.txt文件

python生成requirements.txt文件

时间:2022-12-02 09:22:30浏览次数:44  
标签:文件 requirements python utf8 生成 -- txt

 

使用步骤: 
1、先安装pipreqs库

pip install pipreqs
2、在当前目录使用生成

pipreqs ./ --encoding=utf8 --force                       
--encoding=utf8 :为使用utf8编码

--force :强制执行,当 生成目录下的requirements.txt存在时覆盖

. /: 在哪个文件生成requirements.txt 文件

pip install -r requirements.txt                       安装依赖包 

 

 

标签:文件,requirements,python,utf8,生成,--,txt
From: https://www.cnblogs.com/gina11/p/16943389.html

相关文章

  • Python加密操作 对称加密/非对称加密
    安装包: pycryptodomehttps://pycryptodome.readthedocs.io/en/latest/src/installation.html#compiling-in-linux-ubuntu 1fromCrypto.HashimportSHA2562f......
  • python PIL resize
    https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.resizeImage.resize(size,resample=None,box=None,reducing_gap=None)[source]Re......
  • How to get file size in Python? 获取文件大小Python
    HowtogetfilesizeinPython?WecanfollowdifferentapproachestogetthefilesizeinPython.It’simportanttogetthefilesizeinPythontomonitorfi......
  • Python13-实战
    实战01(模拟篮球自动弹跳)#-*-coding:utf-8-*-importsys#导入sys模块importpygame#导入pygame模块pygame.init()#初始化pygamesize=width,height=640,......
  • python第13章实例
    #_*_coding:utf-8_*_importsysimportpygamepygame.init()size=width,height=640,480screen=pygame.display.set_mode(size)color=(0,0,0)ball=pygame.ima......
  • Python第十三章小球移动游戏
    #-*-coding:utf-8-*-importsys#导入sys模块importpygame#导入pygame模块pygame.init()#初始化pygamesize=width,height=640,480#设置窗口screen=pyga......
  • Python第十三章实验报告
    第十三章实验报告——篮球自动弹跳代码如下:1#----------实例01:制作一个跳跃的小球游戏----------#2importsys3importpygame4pygame.init()......
  • python篮球自动弹跳
           具体思路是首先导入sys和pygame模块然后初始化pygame然后显示窗口加载篮球图片执行死循环检查事件设置移动篮球将图片画在窗口上最后更新全部显示......
  • python-练习(知识点到逻辑运算符)
    1.在终端中显示古诗"登高"print("登高")print("作者:杜甫")print("风急天高猿啸哀,渚清沙白鸟飞回。")print("无边落木萧萧下,不尽长江滚滚来。")pr......
  • python第十三章实例1
    #-*-coding:utf-8-*-importsys#导入sys模块importpygame#导入pygame模块p......