使用bazel 编译tensorflow serving时报错:fatal error: Python.h: No such file or directory

使用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 o

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在查看您提供的引用内容后,出现AttributeError: 'NoneType' object has no attribute '_stop_serving'的错误可能与graph.py文件中的一些问题相关。在optimize_graph函数中,有一个try-except语句块被注释掉了。这可能导致程序无法捕获和处理异常,从而引发AttributeError。另外,根据引用中的内容,如果fsspec的版本过低或者未安装,也可能导致该错误。您可以尝试安装或更新fsspec库来解决此问题。请参考引用中提供的安装指南。同,您还可以查看引用中提供的GitHub问题页面,可能会有更多关于此错误的讨论和解决方案。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [bert-serving-start TypeError: ‘NoneType‘ object is not iterable window cpu环境下解决方案](https://blog.csdn.net/mimazitx/article/details/111667417)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [解决‘NoneType‘ object has no attribute ‘message_types_by_name](https://blog.csdn.net/qq_35812205/article/details/130792405)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值