Setting Protoc for Object Detection API throwing errors


I am trying to install the object detection API on jetpack 4.4 TF 2.3.1.

All other required packages installed fine. Then I got to the part where I have to type protoc object_detection/protos/*.proto --python_out=.

and at first it said permission denied, so I changed permissions to 755 and then I tried again and it says:

nvidia@nvidia-desktop:~/Downloads/models/research$ protoc object_detection/protos/*.proto --python_out=.
bash: /usr/local/bin/protoc: cannot execute binary file: Exec format error

I am following instructions here: Tensorflow API TF2 Linux Installation Guide

Extremely frustrating after getting it to work on my PC to train a great model, then finally getting TRT optimization to work as well. Now the final step of running a nice FP16 optimized model and I can’t even get the API installed LOL!

Any help greatly appreciated!



Jetson is an ARM system.
You can build the protobuf from source to get a compatible executable.

Here is some information for your reference:


Thank you I found a github repo with sh files to install it on the jetson but was for protobuf 3.8 so I went and got the latest version for arm and I edited the sh files to install that one.

The install completed without error and protobuf 3.15.6 is installed into usr/local/lib/python3.6/dist-packages/protobuf-3.15.6-py3.6-linux-aarch64.egg

and there is also a usr/local/include/google/protobuf folder as well.

when I run my script now I am getting no module google.protobuf

Sorry I am not a big Linux user so if you could help me with setting the path to that folder as it is definitely in there I would appreciate it!

for reference I used the commands found in Jetson Nano git repo


EDIT: Full Error:

.py", line 18, in <module>
import tensorflow as tf
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/", line 41, in <module>
    from import module_util as _module_util
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/", line 40, in <module>
    from tensorflow.python.eager import context
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/", line 32, in <module>
    from tensorflow.core.framework import function_pb2
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/core/framework/", line 7, in <module>
    from google.protobuf import descriptor as _descriptor
ModuleNotFoundError: No module named 'google.protobuf'

EDIT: I can import google.auth but not google.protobuf , even though if I type import google. in VSCode the auto complete finds protobuf in the list of suggestions. But it wont import if I select it and run the script. Confused!

EDIT: So it turns out in TF2 you need to delete the innit py file inside the installed protobuf subfolder google/ and then it works!


Do you fix this after delete the innit py file?


yes thanks :)