Search code examples
pythontensorflowprotocol-buffersbazel

Bazel has no definition for py_proto_library


I'm getting the following error when trying to run

$ bazel build object_detection/...

And I'm getting ~20 of the same error (1 for each time it attempts to build that). I think it's something with the way I need to configure bazel to recognize the py_proto_library, but I don't know where, or how I would do this.

/src/github.com/tensorflow/tensorflow_models/object_detection/protos/BUILD:325:1: name 'py_proto_library' is not defined (did you mean 'cc_proto_library'?).

I also think it could be an issue with the fact that initially I had installed the cpp version of tensorflow, and then I built it for python.


Solution

  • The solution ended up being running this command, like the instructions say:

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

    and then running this command, like the instructions say.:

    $ export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim