使用tensorflow构建项目时出错

时间:2016-05-07 00:16:18

标签: python tensorflow bazel tensorflow-serving

我收到错误:

error loading package '': Extension file not found. Unable to load package for '//tensorflow/tensorflow:workspace.bzl': BUILD file not found on package path.

每当我尝试使用tensorflow运行bazel项目时。 我从https://github.com/tensorflow/serving/blob/master/WORKSPACE

复制了工作区文件

这是我的工作区文件版本:

workspace(name = "tf_sketch_rec")

local_repository(
  name = "tf_graph_build",
  path = __workspace_dir__ + "/src/main/python",
)

local_repository(
  name = "tf_graph_run",
  path = __workspace_dir__ + "/src/main/java",
)

load('//tensorflow/tensorflow:workspace.bzl', 'tf_workspace')
tf_workspace("tensorflow/", "@tf")

# Specify the minimum required Bazel version.
load("@tf//tensorflow:tensorflow.bzl", "check_version")
check_version("0.2.0")

# ===== gRPC dependencies =====

bind(
    name = "libssl",
    actual = "@boringssl_git//:ssl",
)

git_repository(
    name = "boringssl_git",
    commit = "436432d849b83ab90f18773e4ae1c7a8f148f48d",
    init_submodules = True,
    remote = "https://github.com/mdsteele/boringssl-bazel.git",
)

bind(
    name = "zlib",
    actual = "@zlib_archive//:zlib",
)

new_http_archive(
    name = "zlib_archive",
    build_file = "zlib.BUILD",
    sha256 = "879d73d8cd4d155f31c1f04838ecd567d34bebda780156f0e82a20721b3973d5",
    strip_prefix = "zlib-1.2.8",
    url = "http://zlib.net/zlib128.zip",
)

我确实安装了tensorflow,python运行的文件不需要安装bazel。

0 个答案:

没有答案