【问题标题】:pip's dependency resolver takes way too long to solve the conflictpip 的依赖解析器需要很长时间才能解决冲突
【发布时间】:2021-05-06 13:51:24
【问题描述】:

我一直在尝试通过 pip 在我的 rpi 3 模型 B 上安装一个包 我的操作系统是 raspbian。基于 Debian 的 pip 版本是 21.0.1,python 版本是 3.7.4 我正在使用的命令是:

python3 -m pip install librosa

问题是依赖解析器花费了太长时间来解决冲突。 几个小时后,它会一遍又一遍地重复这条线几个小时(我什至让安装运行了两天一夜)

INFO: pip is looking at multiple versions of <Python from requires-Python> to determine which version is compatible with other requirements. this could take a while.
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run you can press ctrl + c to do so.

我尝试使用更严格的约束,例如添加“numpy > 1.20.0”和其他内容,但现在弹出了,我不知道我现在能做什么。

【问题讨论】:

  • 您尝试安装的全套软件包和版本是什么?

标签: python installation pip librosa


【解决方案1】:

从 pip 20.3 开始,引入了一个新的(并非总是有效的)解析器。从 pip 21.0 开始,旧的(工作的)解析器不受支持,并计划根据 pip 团队资源进行删除。

Changes to the pip dependency resolver in 20.3

我在尝试构建 jupyter 时遇到了同样的问题,我的解决方案是将 pip 固定回 20.2 版本,这是旧解析器的最后一个版本。这已经超出了我的构建在使用 pip 21.1.1 下的新解析器时窒息的地步。

第二种可能有效(未经测试)的方法是使用标志:

--use-deprecated=legacy-resolver

似乎是在 20.3 切换到新的解析器时添加的。假设它有效,这将允许更新 pip 版本的好处,直到回溯问题得到解决。

【讨论】:

  • 为什么会这么快?
猜你喜欢
  • 2014-05-19
  • 2021-02-21
  • 2013-01-22
  • 2017-01-30
  • 1970-01-01
  • 2019-10-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多