简体   繁体   English

使用 Bazel 安装 Tensorflow 时调用了 ProcessError

[英]CalledProcessError while installing Tensorflow using Bazel

I am trying to install Tensorflow from source using Bazel on Raspberry pi.我正在尝试在 Raspberry pi 上使用 Bazel 从源代码安装 Tensorflow。 I am following the official documentation as given here .我正在遵循此处给出的官方文档。 When I run the ./configure in Tensorflow directory after completing all the steps written for Bazel, I get the following error在完成为 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

I didn't put the user flag in the bazel installation.我没有在 bazel 安装中放置用户标志。 So, I think this might be bazelrc error so I tried to set $PATH=$BAZEL/bin but nothing happened.所以,我认为这可能是 bazelrc 错误,所以我尝试设置$PATH=$BAZEL/bin但什么也没发生。

Please give any suggestion !!请给任何建议!!

Probably the problem is that the non appropriate version of bazel is installed.问题可能是安装了不合适的 bazel 版本。 Run bazel version in the tensorflow directory, and see if there is an error.在tensorflow目录下运行bazel version ,看看有没有错误。 If there is a problem with bazel version, then check out the .baselversion file, and if it contains a version that isn't installable with apt, then dowload the installer from https://github.com/bazelbuild/bazel/releases then install it, else install with apt.如果 bazel 版本有问题,请查看 .baselversion 文件,如果它包含无法使用 apt 安装的版本,则从https://github.com/bazelbuild/bazel/releases下载安装程序然后安装它,否则用apt安装。 After that everything should work fine.之后一切都应该正常工作。

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

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