2016-01-22 46 views
3

我想從源代碼安裝最新的TensorFlow。我把資料庫,然後跑去無法使用bazel從源代碼構建TensorFlow。 2016年1月22日

bazel build -c opt //tensorflow/tools/pip_package:build_pip_package

我得到這個錯誤:

ERROR: /home/samuelchin/tensorflow/tensorflow/models/embedding/BUILD:10:6: First argument of load() is a path, not a label. It should start with a single slash if it is an absolute path. 
ERROR: /home/samuelchin/tensorflow/tensorflow/models/embedding/BUILD:10:6: file '/tensorflow:tensorflow.bzl.bzl' was not correctly loaded. Make sure the 'load' statement appears in the global scope in your file. 
ERROR: /home/samuelchin/tensorflow/tensorflow/models/embedding/BUILD:104:1: name 'tf_gen_op_wrapper_py' is not defined. 
ERROR: /home/samuelchin/tensorflow/tensorflow/tools/pip_package/BUILD:13:1: Target '//tensorflow/models/embedding:package' contains an error and its package is in error and referenced by '//tensorflow/tools/pip_package:build_pip_package'. 
ERROR: Loading failed; build aborted. 
INFO: Elapsed time: 0.071s. 

回答

5

對TensorFlow BUILD文件進行了最近更改,導致依賴於Bazel 0.1.4。這是[email protected]郵件列表上的announced,但尚未將其納入網站的文檔中。

正如你已經發現的,升級Bazel到version 0.1.4應該修復這個構建錯誤。

1

原來,巴澤爾已經過時。我的bazel以前的版本是0.1.2,最後在12月更新。 Bazel此後被更新至0.1.4。對於那些有這個錯誤的人來說,更新bazel可以做到這一點。然後您可以按照常規進行構建。

我想在將來,如果它不能建立,你可能想檢查bazel是否更新到最新版本。

+1

我不會特別推薦最新版本。 IIRC有一段時間,Bazel 0.1.1可以工作,0.1.2不能工作,0.1.2是最新版本。這是特定版本的工作,而不是最新版本。我知道巴澤爾集團一直在關注讓巴澤爾爲TensorFlow的公開版繼續工作,但我不知道細節。 –

相關問題