I am trying to create the .whl package file for Tensorflow v2.11.0 cpu only using the command
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
I run into the following error when compiling device_attributes.pb.h:
.\tensorflow/core/framework/device_attributes.pb.h(12): fatal error C1189: #error: This file was generated by a newer version of protoc which is
Target //tensorflow/tools/pip_package:build_pip_package failed to build
I am using Windows 10, which does support Tensorflow v2.11.0 for CPU only,
Python3.8,
Bazel 5.3.0
With further inspection, the device_attributes.pb.h file, which is generated by protocal buffer compiler and CANNOT BE EDITTED shows:
The values for PROTBUF_VERSION and PROTBUF_MIN_PROTOC_VERSION is 3009000
I’m not sure if this is the root cause and why the generated pb.h file has different values for PROTOBUF_VERSION. In github repo for Tensorflow v2.11.0, the required package for protobuf has to be >= 3.9.2, <3.20
When I run pip show protobuf, my version is 3.9.2
When I run protoc --version, my version is 3.9.2