pip安装包时遭遇protobuf版本依赖冲突,为何无法自动解决?
pip依赖版本冲突问题:protobuf版本不兼容报错
我在使用pip安装某个包时,该包的多个依赖对protobuf有着不同的版本要求,pip输出了如下错误:
通过pipdeptree工具可以看到,没有包要求protobuf版本高于4.0,但toto.lightstep要求protobuf版本低于4.0,依赖树如下:
toto-wrapper==0.2.0 - toto-protobuf [required: >=0.0.2, installed: 0.0.2] - protobuf [required: Any, installed: 4.21.5] - toto.lightstep [required: Any, installed: 1.4.1] - protobuf [required: >=3.0.0b2.post2, installed: 4.21.5] - protobuf [required: >=3.15.0,<5.0.0dev, installed: 4.21.5] - protobuf [required: >=3.6.0,<4.0, installed: 4.21.5] - protobuf [required: Any, installed: 4.21.5]
按道理pip应该能自动解析这类依赖要求并安装合适的版本,为何会出现这个问题?
补充说明:此问题发生在全新环境中,安装lightstep前未安装protobuf。
内容的提问来源于stack exchange,提问作者Bertrand
相关产品推荐
相关产品推荐

