Anyone can suggest me how to install protobuf in raspberrypi 3 b+.

if I directly install using the command pip install protobuf it is install but I am not able to import ?

  • This question looks half asked? "if di" means what? Please add more detail to your question.
    – Vincent P
    May 2 '19 at 12:20
  • Please be more specific about what you did so far, i.e. how did you exactly install it (the actual commands), did that report back anything important? How fails the import? Furthermore please check if pip is installing for Python3 not Python2.x, issue pip -V. Try to use pip3 to install, if the result reads something like "Python 2.7).
    – Ghanima
    May 2 '19 at 13:49

I suggest to install protobuf in raspberrypi 3 b+ from the default repository. With:

rpi ~$ apt list *protobuf*

you will find some packages supporting protocol buffers. Just install what you want, for example:

rpi ~$ sudo apt install python3-protobuf

You will also find the protobuf compiler if you need it. Installing from the repository has the big advantage that it fits best into the Raspbian operating system and will mostly run out of the box and will take updates automatically. Maybe you have only to do some configurations before running it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.