'protoc' is not recognized as an internal or external command, operable program or batch file

Viewed 1522

When I tried this for Protobuf Compilation by cmd

protoc object_detection/protos/*.proto --python_out=.

It shows me

'protoc' is not recognized as an internal or external command, operable program or batch file.

How to fix this ??

1 Answers

It is likely that you had the same problem I had. Are you following the TensorFlow 2 Object Detection API tutorial?

At some point you go to the protoc release pages and see downloads such as "protobuf-all-3.17.0.zip" and "protoc-3.17.0-win64.zip" (BIG difference). Make sure you download "protoc" and not "protobuf-all".

Make sure you can find "protoc.exe" in the folder you extract. Example, in my computer I have:


C:\Program Files\Google Protobuf\bin\protoc.exe


"protoc.exe" is the compiler.

If anyone reading this is totally lost, see if you can find your c++ compiler. For me it is


C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\Hostx64\x64\cl.exe


and the compiler is called "cl.exe"

Related