【问题标题】:Bazel issue while building a pip package for TensorFlow with CPU-only support为仅支持 CPU 的 TensorFlow 构建 pip 包时出现 Bazel 问题
【发布时间】:2017-10-22 06:03:49
【问题描述】:

伙计们!我正在尝试按照Installing TensorFlow from Sources 中的步骤为tensorflow 构建一个pip 包。在调用以下命令后:$ bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package,但是,我得到了如下:

ERROR: error loading package '': Encountered error while reading extension file
'closure/defs.bzl': no such package '@io_bazel_rules_closure//closure': Error do
wnloading [http://mirror.bazel.build/github.com/bazelbuild/rules_closure/archive
/aac19edc557aec9b603cd7ffe359401264ceff0d.tar.gz, https://github.com/bazelbuild/
rules_closure/archive/aac19edc557aec9b603cd7ffe359401264ceff0d.tar.gz] to /priva
te/var/tmp/_bazel_WilliamHuang/75f5fa598a7d55b225c399e7e82a3908/external/io_baze
l_rules_closure/aac19edc557aec9b603cd7ffe359401264ceff0d.tar.gz: All mirrors are
down: [].
INFO: Elapsed time: 58.126s

我的./配置如下:

Do you wish to build TensorFlow with MKL support? [y/N] n
No MKL support will be enabled for TensorFlow
Please specify optimization flags to use during compilation when 
bazel option "--config=opt" is specified [Default is -march=native]: 
Do you wish to build TensorFlow with Google Cloud Platform support? 
[y/N] n
No Google Cloud Platform support will be enabled for TensorFlow
Do you wish to build TensorFlow with Hadoop File System support? 
[y/N] n
No Hadoop File System support will be enabled for TensorFlow
Do you wish to build TensorFlow with the XLA just-in-time compiler 
(experimental)? [y/N] n
No XLA JIT support will be enabled for TensorFlow
Do you wish to build TensorFlow with VERBS support? [y/N] n
No VERBS support will be enabled for TensorFlow
Do you wish to build TensorFlow with OpenCL support? [y/N] n
No OpenCL support will be enabled for TensorFlow
Do you wish to build TensorFlow with CUDA support? [y/N] n
No CUDA support will be enabled for TensorFlow

而我的 bazel 版本是 0.4.5

Build label: 0.4.5-homebrew

希望你们能帮我解决这个问题。提前致谢。

【问题讨论】:

    标签: tensorflow pip bazel


    【解决方案1】:

    我通过在$ bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package 之前设置代理解决了这个问题

    export http_proxy=http://proxy_ip:port  (e.g. export http_proxy=http://10.110.0.25:8888)
    export https_proxy=http://proxy_ip:port
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-31
      • 2017-08-23
      • 1970-01-01
      • 2019-10-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-26
      相关资源
      最近更新 更多