繁体   English   中英

从源代码中 Bazel Build 安装 Tensorflow 时出错

[英]Error in Bazel Build Installation of Tensorflow From Source

最近,我尝试在 MacOS 计算机上从源代码安装 TensorFlow 模块。 到目前为止,我已经通过安装 Python 3.6、TensorFlow pip 包依赖项(我已经安装了 pip)和使用他们网站上给出的命令安装 Bazel 取得了进展。 在了解到这个错误后,我配置了源代码树,首先使用 Python 3.6,然后使用 2.7。 然而,不久之后,当我输入命令时:

bazel build -config=opt//tensorflow/tools/pip_package:build_pip_package

我收到了这条消息:

Starting local Bazel server and connecting to it...
INFO: Invocation ID: 2028ac42-5ccd-4c28-9156-e7d547c89263
ERROR:          /private/var/tmp/_bazel_surengrigorian/c9e5c7de228d990fbf93866f2deac188/external/local_config_cc/BUILD:58:5: in apple_cc_toolchain rule 
@local_config_cc//:cc-compiler-watchos_arm64_32: Xcode version must   be specified to use an Apple CROSSTOOL. If your Xcode version has    changed recently, try: "bazel clean --expunge" to re-run Xcode   configuration
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build   aborted: Analysis of target '@local_config_cc//:cc-compiler-   watchos_arm64_32' failed; build aborted
INFO: Elapsed time: 11.538s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (171 packages loaded,    3109 targets\
configured)
    currently loading: tensorflow/core/kernels
    Fetching @swig; fetching 4s
    Fetching @grpc; fetching

感谢您提供有关如何修复此错误的任何帮助。

我遇到过同样的问题。 我通过降级 Bazel 版本解决了这个问题。 就我而言,Bazel 21.0 不起作用。 将 bazel 重新安装到 18.0 工作正常。 https://github.com/bazelbuild/bazel/releases/tag/0.18.0

降级到 Bazel 0.29.1 对我有用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM