簡體   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