【问题标题】:When bazel build tensorflow/python/tools:freeze_graph , build failed当 bazel 构建 tensorflow/python/tools:freeze_graph 时,构建失败
【发布时间】:2019-01-23 07:20:08
【问题描述】:

ubuntu 14.04
巴泽尔 0.11.1
张量流分支 r1.8
蟒蛇 2.7.13
numpy 1.16.0
运行 bazel build tensorflow/python/tools:freeze_graph,得到这个错误:


 Executing genrule //tensorflow/tools/api/generator:python_api_gen failed (Aborted): bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped)
ImportError: No module named _multiarray_umath
ImportError: No module named _multiarray_umath
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
2019-01-23 15:07:42.016909: F tensorflow/python/lib/core/bfloat16.cc:664] Check failed: PyBfloat16_Type.tp_base != nullptr
/bin/bash: line 1: 16783 Aborted                 (core dumped) bazel-out/host/bin/tensorflow/tools/api/generator/create_python_api bazel-out/k8-opt/genfiles/tensorflow/tools/api/generator/api/__init__.py bazel-out/k8-opt/genfiles/tensorflow/tools/api/generator/api/app/__init__.py bazel-out/k8-opt/genfiles/tensorflow/tools/api/generator/api/bitwise/__init__.py bazel-out/k8-opt/genfiles/tensorflow/tools/api/generator/api/compat/__init__.py bazel-out/k8-opt/genfiles/tensorflow/tools/api/generator/api/contrib/__init__.py bazel-out/k8-opt/
...
Target //tensorflow/python/tools:freeze_graph failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1042.106s, Critical Path: 93.47s
FAILED: Build did NOT complete successfully

怎么了?

【问题讨论】:

    标签: tensorflow bazel tensorflow-lite


    【解决方案1】:

    错误表明_multiarray_umath 存在问题。
    尝试先升级 numpy:

    pip install --upgrade numpy
    

    如果还是不行,试试这个命令:

    sudo apt-get install python3-numpy
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-28
      • 2019-02-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多