Is it possible to re-check the dependencies of packages installed with pip? That is, suppose we have a working environment. Then, one of the packages changes (gets upgraded, etc). Is there a command one can run to make to make sure that the dependency tree is still sound and does not have conflicts?
Nowadays python -m pip check
should do the trick.
Seems to have been added as early as pip 9.0.0 released on 2016-11-02 .
It's not part of pip, but there is a tool you can use called pip-conflict-checker . Just install it through pip and run pipconflictchecker
to get a dump of all the conflicts. pipdeptree could also help here.
You might also be interested in reading this article about dealing with pip dependency issues. The article also discusses the two tools I mentioned above along with strategies to fix broken dependencies.
在最近的 pip 版本中,如果requirements.txt
指定的依赖项有任何冲突,则使用pip install -r requirements.txt
将失败。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.