有没有办法让pip在更新的requirements.txt中仅安装新的依赖项 [英] Is there a way for pip to install only new dependencies in an updated requirements.txt

查看:407
本文介绍了有没有办法让pip在更新的requirements.txt中仅安装新的依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

pip install --upgrade -r requirements.txt

重复所有以前安装的依赖项的安装过程,当我有大量依赖项(例如30多个?)时,这可能会很麻烦

repeats the installation process for all the previously installed dependencies which can be a pain when I have a huge list of dependencies (like more than 30?)

是否没有办法检查更新的requirements.txt并仅安装自上次安装尝试以来已包含在requirements.txt文件中的特定依赖项?

Isn't there a way to check an updated requirements.txt and install only specific dependencies that have been included into the requirements.txt file since the previous installation attempt?

我发现这是pip的真正缺点(或者在virtualenv中使用pip).完全不喜欢pip的重复安装性质.

I find this to be a real shortcoming of pip (or using pip in virtualenv for that matter). Do not like the repetitive installation nature of pip at all.

推荐答案

如Piotr在上面的注释中所述,如果命令中未包含"--upgrade",则将仅保留已安装的python软件包.

As mentioned by Piotr in the comments above, if "--upgrade" is not included in the command, already installed python packages are left alone.

这篇关于有没有办法让pip在更新的requirements.txt中仅安装新的依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆