My project has two dependencies, and each of them transitively depends on a different major version of protobuf.
The general situation is well described
The specific problem in my project manifests with this error message from Poetry.
kfp (1.8.21) depends on protobuf (>=3.13.0,<4)
and robotframework-browser (18.0.0) depends on protobuf (4.25.1)
These packages operate completely independently. They do not share data. If each was able to use its own protobuf version, things would work out. Is this possible in Python?
Unfortunately not easily at all. A single Python environment can't have two copies of a package by the same name.
Your major options are to
kfp
and robotframework-browser
that have compatible protobuf
requirements (kfp~=1.8
is pretty old though, you might consider upgrading!)protobuf~=4
anyway, and see if kfp
works with itprotobuf~=3
anyway, and see if robotframework-browser
works with itBeyond that, if you can't upgrade kfp
, you could fork and patch kfp
to depend on and use protobuf>=4
...