tensorflow: .bazelversion and configure.py conflicts

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): ubuntu 18.04.3
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
  • TensorFlow installed from (source or binary): source master
  • TensorFlow version: master 2.1.0
  • Python version: 3.8.2
  • Installed using virtualenv? pip? conda?: N/A
  • Bazel version (if compiling from source): 3.1.0
  • GCC/Compiler version (if compiling from source): 7.5.0
  • CUDA/cuDNN version: 10.2/7.6.5
  • GPU model and memory: GTX1080Ti GDDR5X 11GB

Describe the problem

.bazelversion and configure.py. bazel version requirements are different from each other, causing error.

Provide the exact sequence of commands / steps that you executed before running into the problem .configure

Any other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

.configure

Traceback (most recent call last):
  File "./configure.py", line 1557, in <module>
    main()
  File "./configure.py", line 1369, in main
    current_bazel_version = check_bazel_version(_TF_MIN_BAZEL_VERSION,
  File "./configure.py", line 482, in check_bazel_version
    curr_version = run_shell(
  File "./configure.py", line 159, in run_shell
    output = subprocess.check_output(cmd, stderr=stderr)
  File "/home/wmind/anaconda3/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/home/wmind/anaconda3/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['bazel', '--batch', '--bazelrc=/dev/null', 'version']' returned non-zero exit status 1.

bazel --version

ERROR: The project you're trying to build requires Bazel 3.0.0 (specified in /home/wmind/repo/tensorflow/.bazelversion), but it wasn't found in /usr/bin.

You can install the required Bazel version via apt:
  sudo apt update && sudo apt install bazel-3.0.0

If this doesn't work, check Bazel's installation instructions for help:
  https://docs.bazel.build/versions/master/install-ubuntu.html

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 33 (19 by maintainers)

Most upvoted comments

@mihaimaruseac

wmind@wmind-deep:~/repo/tensorflow$ bazel clean --expunge
ERROR: The project you're trying to build requires Bazel 3.1.0 (specified in /home/wmind/repo/tensorflow/.bazelversion), but it wasn't found in /usr/bin.

You can install the required Bazel version via apt:
  sudo apt update && sudo apt install bazel-3.1.0

If this doesn't work, check Bazel's installation instructions for help:
  https://docs.bazel.build/versions/master/install-ubuntu.html
wmind@wmind-deep:~/repo/tensorflow$ git checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
wmind@wmind-deep:~/repo/tensorflow$ git pull --rebase
Already up to date.
wmind@wmind-deep:~/repo/tensorflow$ git show
commit d8b90acf95bdff09e29b1065739e28e8bd7500d9 (HEAD -> master, origin/master, origin/HEAD)
Author: Dan Moldovan <mdan@google.com>
Date:   Mon Jun 22 18:46:12 2020 -0700

    Enable type annotations for python/ops.
    
    PiperOrigin-RevId: 317779660
    Change-Id: Ife6b7319ef394b611798f5d01b64ebdb3c0a01cc

diff --git a/tensorflow/python/ops/logging_ops.py b/tensorflow/python/ops/logging_ops.py
index 8ca63f5598..02fce27769 100644
--- a/tensorflow/python/ops/logging_ops.py
+++ b/tensorflow/python/ops/logging_ops.py
@@ -54,11 +54,9 @@ except NameError:
 # call relies on certain conditionals for its dependencies.  Use
 # control_flow_ops.Assert.
 
-# Assert and Print are special symbols in python, so we must
-# have an upper-case version of them.
-#
-# For users with Python 3 or Python 2.7
wmind@wmind-deep:~/repo/tensorflow$ python configure.py
WARNING: current bazel installation is not a release version.
Make sure you are running at least bazel 3.1.0
Please specify the location of python. [Default is /home/wmind/anaconda3/bin/python]: