繁体   English   中英

使用 Bazel 安装 Tensorflow 时调用了 ProcessError

[英]CalledProcessError while installing Tensorflow using Bazel

我正在尝试在 Raspberry pi 上使用 Bazel 从源代码安装 Tensorflow。 我正在遵循此处给出的官方文档。 在完成为 Bazel 编写的所有步骤后,在 Tensorflow 目录中运行./configure ,出现以下错误

/home/cvit/bin/bazel: line 88: /home/cvit/.bazel/bin/bazel-real: cannot execute binary file: Exec format error
/home/cvit/bin/bazel: line 88: /home/cvit/.bazel/bin/bazel-real: Success
Traceback (most recent call last):
  File "./configure.py", line 1552, in <module>
    main()
  File "./configure.py", line 1432, in main
    check_bazel_version('0.15.0')
  File "./configure.py", line 450, in check_bazel_version
    curr_version = run_shell(['bazel', '--batch', '--bazelrc=/dev/null', 'version'])
  File "./configure.py", line 141, in run_shell
    output = subprocess.check_output(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['bazel', '--batch', '--bazelrc=/dev/null', 'version']' returned non-zero exit status 1

我没有在 bazel 安装中放置用户标志。 所以,我认为这可能是 bazelrc 错误,所以我尝试设置$PATH=$BAZEL/bin但什么也没发生。

请给任何建议!!

问题可能是安装了不合适的 bazel 版本。 在tensorflow目录下运行bazel version ,看看有没有错误。 如果 bazel 版本有问题,请查看 .baselversion 文件,如果它包含无法使用 apt 安装的版本,则从https://github.com/bazelbuild/bazel/releases下载安装程序然后安装它,否则用apt安装。 之后一切都应该正常工作。

暂无
暂无

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

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