Thursday, March 10, 2016

Extension file not found. Unable to load package for '//google/protobuf:protobuf.bzl'

When building TensorFlow with Bazel, you might encounter the following error:

$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
Sending SIGTERM to previous Bazel server (pid=6711)... done.
...........
ERROR: /Users/izeye/IdeaProjects/tensorflow/tensorflow/tools/pip_package/BUILD:23:1: error loading package 'tensorflow/core': Extension file not found. Unable to load package for '//google/protobuf:protobuf.bzl': BUILD file not found on package path and referenced by '//tensorflow/tools/pip_package:build_pip_package'.
ERROR: Loading failed; build aborted.
INFO: Elapsed time: 0.759s
$

If you didn't add the following option when you were cloning the TensorFlow GitHub project:

--recurse-submodules

Use the following command:

git submodule update --init

References:
https://github.com/tensorflow/tensorflow/issues/1069
https://www.tensorflow.org/versions/r0.7/get_started/os_setup.html

No comments:

Post a Comment