search

Home  >  Q&A  >  body text

python - 如果requirements.txt文件已经存在,我如何用pip命令生成可以覆盖旧文件?选项是什么?

如题,之前生成了一份requirements.txt文件,现在安装了新扩展,需要更新一下requirements.txt文件,我在cmd命令进入virtual环境后直接用 pip freeze > requirements.txt 回车,然后看requirements.txt 文件还是没有变化。想删除文件然后再生成,但是这样太麻烦pip应该有覆盖选项的。

ringa_leeringa_lee2893 days ago789

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-04-17 17:40:50

    It’s not that there has been no change, but maybe you got the directory wrong. If that doesn’t work, just bring the absolute path to txt

    reply
    0
  • Cancelreply