1

I am following https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/graph_transforms/README.md#optimizing-for-deployment and running this command:

bazel build tensorflow/tools/graph_transforms:transform_graph

and getting this error:

ERROR: /Users/daniel/software/tensorflow/tensorflow/core/BUILD:2475:1: no such package '@local_config_git//': Traceback (most recent call last): File "/Users/daniel/software/tensorflow/third_party/git/git_configure.bzl", line 52 _fail(result.stderr) File "/Users/daniel/software/tensorflow/third_party/git/git_configure.bzl", line 14, in _fail fail(("%sGit Configuration Error:%s %...))) Git Configuration Error: java.io.IOException: Cannot run program "/usr/bin/python3" (in directory "/private/var/tmp/_bazel_daniel/bff3ff07c5339b6b7496cc244d119e78/external/local_config_git"): error=2, No such file or directory and referenced by '//tensorflow/core:version_info_gen' ERROR: /Users/daniel/software/tensorflow/tensorflow/core/BUILD:2475:1: no such package '@local_config_git//': Traceback (most recent call last): File "/Users/daniel/software/tensorflow/third_party/git/git_configure.bzl", line 52 _fail(result.stderr) File "/Users/daniel/software/tensorflow/third_party/git/git_configure.bzl", line 14, in _fail fail(("%sGit Configuration Error:%s %...))) Git Configuration Error: java.io.IOException: Cannot run program "/usr/bin/python3" (in directory "/private/var/tmp/_bazel_daniel/bff3ff07c5339b6b7496cc244d119e78/external/local_config_git"): error=2, No such file or directory and referenced by '//tensorflow/core:version_info_gen' ERROR: /Users/daniel/software/tensorflow/tensorflow/core/BUILD:2475:1: no such package '@local_config_git//': Traceback (most recent call last): File "/Users/daniel/software/tensorflow/third_party/git/git_configure.bzl", line 52 _fail(result.stderr) File "/Users/daniel/software/tensorflow/third_party/git/git_configure.bzl", line 14, in _fail fail(("%sGit Configuration Error:%s %...))) Git Configuration Error: java.io.IOException: Cannot run program "/usr/bin/python3" (in directory "/private/var/tmp/_bazel_daniel/bff3ff07c5339b6b7496cc244d119e78/external/local_config_git"): error=2, No such file or directory and referenced by '//tensorflow/core:version_info_gen' ERROR: Analysis of target '//tensorflow/tools/graph_transforms:summarize_graph' failed; build aborted: no such package '@local_config_git//': Traceback (most recent call last): File "/Users/daniel/software/tensorflow/third_party/git/git_configure.bzl", line 52 _fail(result.stderr) File "/Users/daniel/software/tensorflow/third_party/git/git_configure.bzl", line 14, in _fail fail(("%sGit Configuration Error:%s %...))) Git Configuration Error: java.io.IOException: Cannot run program "/usr/bin/python3" (in directory "/private/var/tmp/_bazel_daniel/bff3ff07c5339b6b7496cc244d119e78/external/local_config_git"): error=2, No such file or directory ```

The recurring line of interest (I think) is java.io.IOException: Cannot run program "/usr/bin/python3". The error message is correct:

$ ls /usr/bin/python3 ls: /usr/bin/python3: No such file or directory

But I'm not sure why it's looking for /usr/bin/python3 in the first place, as it's not in my PATH:

$ type python3 python3 is /anaconda3/bin/python3

Is bazel hardcoded to look for that path? I can't create anything in /usr/bin, see: Install Python 3 to /usr/bin/ on macOS

I don't really know what to do here. Any advice welcome.

1 Answer 1

1

[UPDATE] -- Running ./configure from tensorflow/ and accepting all the default options fixed my problem.

Sign up to request clarification or add additional context in comments.

1 Comment

to add: it seems one has to use python3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.