【发布时间】:2019-02-04 22:02:16
【问题描述】:
我正在尝试构建 tensorflow 以在 Zynq,特别是 Z7020 上运行。我在板上运行 petalinux 和 python 3.4.9。尝试按照此处找到的说明构建张量流时:[https://www.tensorflow.org/install/install_raspbian#cross-compiling_from_sources] 请注意,petalinux 和 raspbian 都是 Debian 衍生产品,Z7020 具有与 raspberry-pi 0 和 1 系列板相同的 CortexA9 内核。
我正在尝试在 Ubuntu 16.04 主机上构建。我用来构建的命令是:
sudo CI_DOCKER_EXTRA_PARAMS="-e CI_BUILD_PYTHON=python3 -e CROSSTOOL_PYTHON_INCLUDE=/home/rklein/Python-3.4.9/Include" tensorflow/tools/ci_build/ci_build.sh PI-PYTHON3 tensorflow/tools/ci_build/pi/build_raspberry_pi.sh PI_ONE
Bazel 搅动了大约 2 小时,然后返回以下错误消息:
/home/rklein/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_root/eab0--lots of hex digits--85e8/external/arm_compiler/bin/arm-linux-gnueablhf-gcc --lots of options
In file included from /usr/include/python2.7/Python.h:8:0, from ./tensorflow/python/lib/core/bfloat16.h:19,
from tensorflow/python/lib/core/bfloat16.h:18:
from /usr/include/python2.7/pyconfig.h:13:54:
fatal error: arm-linux-gnueabihf/python2.7/pyconfig.h: No such file or directory
#include <arm-linux-gnueabihf/python2.7/pyconfig.h>
^
compilation terminated.
告诉 Bazel 使用 python3 需要哪些设置?请注意,主机上没有 /usr/include/python2.7 目录,所以我怀疑巴塞尔在幕后做了一些巫术。命令
find ~ -name python2.7
空出来的。
我已尝试尽可能多地阅读 Bazel,但文档似乎很精简 - 任何好的参考资料将不胜感激。
【问题讨论】:
标签: python tensorflow arm bazel zynq