google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.79k stars 5.18k forks source link

mediapipe 0.10.11 is wrongly depending on protobuf 3.x, it should be version > 4.x, even 5.x works #5372

Closed alanwilter closed 6 months ago

alanwilter commented 7 months ago

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

No

OS Platform and Distribution

macOS Silicon

Programming Language and version

Python

MediaPipe version

0.10.11

Solution

FaceMesh

Describe the actual behavior

mediapipe 0.10.11 does not work on macOS, at least not on Silicon ones

Describe the expected behaviour

It should work like it does on Linux

Standalone code/steps you may have used to try to get what you need

I did:

pip install protobuf -U
...
Successfully installed protobuf-5.26.1

and now it works with mediapipe 0.10.11 on my Mac M1.

However, poetry add protobuf does not work because mediapipe is still hooked to protobuf 3.x:

mediapipe 0.10.11 requires protobuf<4,>=3.11, but you have protobuf 5.26.1 which is incompatible.
kuaashish commented 6 months ago

Hi @alanwilter,

Could you please check now with the latest version 0.10.13? It aligns with the community's demand for their specific use case. We have updated the Protobuf dependency to be >=4.25.3 and <5. If the issue persists, please inform us.

Thank you!!

alanwilter commented 6 months ago

Yep, thanks a lot, all peace now.

google-ml-butler[bot] commented 6 months ago

Are you satisfied with the resolution of your issue? Yes No

mokshmalik5757 commented 1 month ago

Can you please update the dependency >=5.28? Since, that is the latest protobuf version. I'm still facing the error.

RomanPogorov commented 4 weeks ago

Can you please update the dependency >=5.28? Since, that is the latest protobuf version. I'm still facing the error.

Me too

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. mediapipe 0.10.15 requires protobuf<5,>=4.25.3, but you have protobuf 5.28.3 which is incompatible.

FelixDombek commented 5 days ago

@mokshmalik5757 @RomanPogorov Your issue may just go away with

python.exe -m pip install --upgrade mediapipe

That, for me, installed a suitable Protobuf version which was compatible with everything else.