使用bazel 编译tensorflow serving时报错:fatal error: Python.h: No such file or directory
2017-08-28 17:38
1441 查看
使用bazel 编译tensorflow serving时报错:fatal error: Python.h: No such file or directory
即:
____[2,911 / 3,824] Compiling external/org_tensorflow/tensorflow/core/ops/script_ops.cc
ERROR: /root/.cache/bazel/_bazel_root/9d2529a5716c088bd9c07f1c8e164988/external/org_tensorflow/tensorflow/python/BUILD:192:1: C++ compilation of rule '@org_tensorflow//tensorflow/python:numpy_lib' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE
-fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -MD -MF ... (remaining 108 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited
with status 1.
In file included from external/org_tensorflow/tensorflow/python/lib/core/numpy.cc:20:0:
external/org_tensorflow/tensorflow/python/lib/core/numpy.h:32:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
____Building complete.
____Elapsed time: 145.828s, Critical Path: 29.73s
解决方法:
安装python-devel即可,注意,不是python-dev
yum -y install python-devel
参考:
http://blog.csdn.net/tianxiajianling/article/details/6636204
即:
____[2,911 / 3,824] Compiling external/org_tensorflow/tensorflow/core/ops/script_ops.cc
ERROR: /root/.cache/bazel/_bazel_root/9d2529a5716c088bd9c07f1c8e164988/external/org_tensorflow/tensorflow/python/BUILD:192:1: C++ compilation of rule '@org_tensorflow//tensorflow/python:numpy_lib' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE
-fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -MD -MF ... (remaining 108 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited
with status 1.
In file included from external/org_tensorflow/tensorflow/python/lib/core/numpy.cc:20:0:
external/org_tensorflow/tensorflow/python/lib/core/numpy.h:32:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
____Building complete.
____Elapsed time: 145.828s, Critical Path: 29.73s
解决方法:
安装python-devel即可,注意,不是python-dev
yum -y install python-devel
参考:
http://blog.csdn.net/tianxiajianling/article/details/6636204
相关文章推荐
- 使用bazel 编译tensorflow serving时报错:fatal error: stropts.h: No such file or directory
- 阿里云服务器使用问题fatal error: Python.h: No such file or directory解决
- 阿里云服务器使用问题fatal error: Python.h: No such file or directory解决
- 编译boost python模块遇到的错误:../../libraries/boost_1_44_0/boost/python/detail/wrap_python.hpp:75:24: fatal error: patchlevel.h: No such file or directory
- fatal error: Python.h: No such file or directory
- python使用urllib.urlretrieve时出现“IOError:[Errno 2] No such file or directory”解决办法
- fatal error: Python.h: No such file or directory 解决
- 使用py2exe 将python文件转成exe文件(以及 error: [Errno 2] No such file or directory: 'MSVCP90.dll'解决方法)
- 配置caffe的python环境时make pycaffe提示fatal error: numpy/arrayobject.h No such file or directory解决方法
- tesseract编译错误:fatal error: allheaders.h: No such file or directory
- 编译QtE出现qbytearray.cpp:52:18: fatal error: zlib.h: No such file or directory
- 安装python-ldap fatal error: lber.h: No such file or directory
- BUG!!!======> 编译安装lua 时 lua.c:67:31: fatal error: readline/readline.h: No such file or directory
- Ubuntu出现错误 ----Fatal error: Python.h: No such file or Directory
- 一种编译错误的解决办法。/usr/include/linux/errno.h:4:23: fatal error: asm/errno.h: No such file or directory
- Ubuntu caffe安装python/caffe/_caffe.cpp:1:52: fatal error: Python.h: No such file or directory
- cocos2d-x 移植到android中编译的一些问题:fatal error: Box2D/Box2D.h: No such file or directory"
- 编译Linux内核时出现“fatal error: linux/netfilter/xt_dscp: No such file or directory”
- QT 嵌入式编译出错:cc1: fatal error: .pch/release-shared-emb-arm/QtGui: No such file or directory 解决方案:
- BUG!!!======> 编译安装lua 时 lua.c:67:31: fatal error: readline/readline.h: No such file or directory