最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - What type of dependency management does `pip` do? - Stack Overflow

programmeradmin6浏览0评论

In this link, one can read:

Pip installs dependencies using a recursive serial loop. Pip does not check to see if all of the dependencies of all packages are met at the same time.

If the packages installed earlier in the order have incompatible dependencies with versions that are different from the ones installed later in the order, the environment is broken, and most importantly, this problem goes undiscovered until you notice some unusual errors.

I was wondering whether this is true, and if not, how pip does exactly its package management?

In the pip documentation, the closest topic to this I could find was dependency resolution, with the following description:

At the start of a pip install run, pip does not have all the dependency information of the requested packages. It needs to work out the dependencies of the requested packages, the dependencies of those dependencies, and so on. Over the course of the dependency resolution process, pip will need to download distribution files of the packages which are used to get the dependencies of a package.

This quote does seem to point in the direction of the initial quote (it only checks the dependency structure starting from the package we want to install, it does not check the whole environment), but I'm not sure.

发布评论

评论列表(0)

  1. 暂无评论