1

On commit:

commit 11d02666e312690d770a1c701d30d29ccc987ff2 (HEAD -> master, origin/master, origin/HEAD)
Author: A. Unique TensorFlower <gardener@tensorflow.org>
Date:   Thu Jul 4 07:29:08 2019 -0700

    Fix uses of private, mangled names for proto enumerators.

    PiperOrigin-RevId: 256549401

Building tool:

time bazel build tensorflow/tools/graph_transforms:summarize_graph


INFO: Options provided by the client:
  Inherited 'common' options: --isatty=0 --terminal_columns=80
INFO: Reading rc options for 'build' from /Users/my_user/external_projects/tensorflow/.bazelrc:
  'build' options: --apple_platform_type=macos --define framework_shared_object=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone --strategy=Genrule=standalone -c opt --announce_rc --define=grpc_no_ares=true --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include
Loading: 
Loading: 0 packages loaded
DEBUG: Rule 'io_bazel_rules_docker' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1556410077 -0400"
Analyzing: target //tensorflow/tools/graph_transforms:summarize_graph (0 packages loaded, 0 targets configured)
Traceback (most recent call last):
  File "/private/var/tmp/_bazel_my_user/747948fb577123a5771581be02ddf56a/external/org_tensorflow/tensorflow/tools/git/gen_git_source.py", line 29, in <module>
    from builtins import bytes  # pylint: disable=redefined-builtin
ImportError: No module named builtins
INFO: An error occurred during the fetch of repository 'local_config_git'
INFO: Call stack for the definition of repository 'local_config_git':
 - /Users/my_user/external_projects/tensorflow/tensorflow/workspace.bzl:72:5
 - /Users/my_user/external_projects/tensorflow/WORKSPACE:19:1
INFO: An error occurred during the fetch of repository 'fft2d'
INFO: Call stack for the definition of repository 'fft2d':
 - /Users/my_user/external_projects/tensorflow/tensorflow/workspace.bzl:579:5
 - /Users/my_user/external_projects/tensorflow/WORKSPACE:19:1
INFO: An error occurred during the fetch of repository 'farmhash_archive'
INFO: Call stack for the definition of repository 'farmhash_archive':
 - /Users/my_user/external_projects/tensorflow/tensorflow/workspace.bzl:236:5
 - /Users/my_user/external_projects/tensorflow/WORKSPACE:19:1
INFO: An error occurred during the fetch of repository 'highwayhash'
INFO: Call stack for the definition of repository 'highwayhash':
 - /Users/my_user/external_projects/tensorflow/third_party/highwayhash/workspace.bzl:6:5
 - /Users/my_user/external_projects/tensorflow/tensorflow/workspace.bzl:41:5
 - /Users/my_user/external_projects/tensorflow/tensorflow/workspace.bzl:80:5
 - /Users/my_user/external_projects/tensorflow/WORKSPACE:19:1
INFO: An error occurred during the fetch of repository 'com_googlesource_code_re2'
INFO: Call stack for the definition of repository 'com_googlesource_code_re2':
 - /Users/my_user/external_projects/tensorflow/tensorflow/workspace.bzl:189:5
 - /Users/my_user/external_projects/tensorflow/WORKSPACE:19:1
INFO: An error occurred during the fetch of repository 'jsoncpp_git'
INFO: Call stack for the definition of repository 'jsoncpp_git':
 - /Users/my_user/external_projects/tensorflow/tensorflow/workspace.bzl:544:5
 - /Users/my_user/external_projects/tensorflow/WORKSPACE:19:1
INFO: An error occurred during the fetch of repository 'aws'
INFO: Call stack for the definition of repository 'aws':
 - /Users/my_user/external_projects/tensorflow/third_party/aws/workspace.bzl:9:5
 - /Users/my_user/external_projects/tensorflow/tensorflow/workspace.bzl:39:5
 - /Users/my_user/external_projects/tensorflow/tensorflow/workspace.bzl:80:5
 - /Users/my_user/external_projects/tensorflow/WORKSPACE:19:1
ERROR: /Users/my_user/external_projects/tensorflow/tensorflow/core/BUILD:2818:1: no such package '@local_config_git//': Traceback (most recent call last):
    File "/Users/my_user/external_projects/tensorflow/third_party/git/git_configure.bzl", line 61
        _fail(result.stderr)
    File "/Users/my_user/external_projects/tensorflow/third_party/git/git_configure.bzl", line 14, in _fail
        fail(("%sGit Configuration Error:%s %...)))
Git Configuration Error: Traceback (most recent call last):
  File "/private/var/tmp/_bazel_my_user/747948fb577123a5771581be02ddf56a/external/org_tensorflow/tensorflow/tools/git/gen_git_source.py", line 29, in <module>
    from builtins import bytes  # pylint: disable=redefined-builtin
ImportError: No module named builtins

 and referenced by '//tensorflow/core:version_info_gen'
ERROR: /Users/my_user/external_projects/tensorflow/tensorflow/core/BUILD:2818:1: no such package '@local_config_git//': Traceback (most recent call last):
    File "/Users/my_user/external_projects/tensorflow/third_party/git/git_configure.bzl", line 61
        _fail(result.stderr)
    File "/Users/my_user/external_projects/tensorflow/third_party/git/git_configure.bzl", line 14, in _fail
        fail(("%sGit Configuration Error:%s %...)))
Git Configuration Error: Traceback (most recent call last):
  File "/private/var/tmp/_bazel_my_user/747948fb577123a5771581be02ddf56a/external/org_tensorflow/tensorflow/tools/git/gen_git_source.py", line 29, in <module>
    from builtins import bytes  # pylint: disable=redefined-builtin
ImportError: No module named builtins

 and referenced by '//tensorflow/core:version_info_gen'
ERROR: /Users/my_user/external_projects/tensorflow/tensorflow/core/BUILD:2818:1: no such package '@local_config_git//': Traceback (most recent call last):
    File "/Users/my_user/external_projects/tensorflow/third_party/git/git_configure.bzl", line 61
        _fail(result.stderr)
    File "/Users/my_user/external_projects/tensorflow/third_party/git/git_configure.bzl", line 14, in _fail
        fail(("%sGit Configuration Error:%s %...)))
Git Configuration Error: Traceback (most recent call last):
  File "/private/var/tmp/_bazel_my_user/747948fb577123a5771581be02ddf56a/external/org_tensorflow/tensorflow/tools/git/gen_git_source.py", line 29, in <module>
    from builtins import bytes  # pylint: disable=redefined-builtin
ImportError: No module named builtins

 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/my_user/external_projects/tensorflow/third_party/git/git_configure.bzl", line 61
        _fail(result.stderr)
    File "/Users/my_user/external_projects/tensorflow/third_party/git/git_configure.bzl", line 14, in _fail
        fail(("%sGit Configuration Error:%s %...)))
Git Configuration Error: Traceback (most recent call last):
  File "/private/var/tmp/_bazel_my_user/747948fb577123a5771581be02ddf56a/external/org_tensorflow/tensorflow/tools/git/gen_git_source.py", line 29, in <module>
    from builtins import bytes  # pylint: disable=redefined-builtin
ImportError: No module named builtins

INFO: Elapsed time: 0.501s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)

Env:

python --version
Python 3.6.5

System Version: macOS 10.14.5 (18F203)
mrgloom
  • 20,061
  • 36
  • 171
  • 301
  • Maybe look at [this](https://stackoverflow.com/questions/27495752/no-module-named-builtins) answer, which suggests running `pip install future` might help resolve the issue. – Cole Robertson Jul 04 '19 at 16:01
  • I have tried it already. – mrgloom Jul 04 '19 at 16:04
  • 2
    Somehow, the Python interpreter that you are using to report the Python version (Python 3.6.5) is not the one being used by Bazel, as the error that you are seeing is due to using a Python 2 interpreter to run a Python 3 program. You may need to set the `BAZEL_PYTHON` environment variable to point to the correct Python executable. – jdehesa Jul 04 '19 at 16:05
  • @jdehesa Yes, you are right. Also running `./configure` and setting path to python solved the problem. – mrgloom Jul 04 '19 at 16:23

2 Answers2

4

Running ./configure and setting path to python3 solved the problem.

mrgloom
  • 20,061
  • 36
  • 171
  • 301
0

For Windows:

Install MSYS2 and extra libraries: https://www.tensorflow.org/install/source_windows

After installing MSYS2 you need to install extra libs using "pacman -S git patch unzip"

"pacman.exe" contain in ./msys64/usr/bin directory.

D. Jagatiya
  • 483
  • 6
  • 7