TensorFlow loads a library called _pywrap_tensorflow.so , which includes its C API (as defined in tensorflow/tensorflow/core/client/tensor_c_api.cc ).
In my case, the library loaded at runtime was located in
~/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so
but the library, which was built from the local source code, was in ~/.cache/bazel/_bazel_<username>/dbb3c677efbf9967e464a5c6a1e69337/tensorflow/bazel-out/local_linux-dbg/bin/tensorflow/python/_pywrap_tensorflow.so .
Copying a locally built library on top of the loaded library and joining the python process, as defined in the task, solve the problem.
source share