尝试按照此处的说明构建TensorFlow:
https://www.tensorflow.org/install/install_sources
奇怪地收到错误:
ERROR: /home/eladw/.cache/bazel/_bazel_eladw/dbbd970aeeecbb3cd584d511cefda723/external/protobuf_archive/BUILD:642:1: C++ compilation of rule '@protobuf_archive//:python/google/protobuf/internal/_api_implementation.so' failed (Exit 1).
external/protobuf_archive/python/google/protobuf/internal/api_implementation.cc:31:20: fatal error: Python.h: No such file or directory
#include <Python.h>
即使我安装了python-dev。
Package python-devel-2.7.5-48.el7.x86_64 already installed and latest version
Nothing to do
有什么想法吗?
答案 0 :(得分:1)
在我已经开始执行bazel构建之后,当我做了 yum安装python36-devel 时,我收到了此错误。 ./ bazel-tensorflow / external / local_config_python / BUILD 已经缓存了不完整的标题列表。 清理边框,然后重新运行该版本,为我解决了该问题。
答案 1 :(得分:0)