来自源:pyconfig.h的构建tensorflow 2 gpu的异常没有此类文件或目录

时间:2019-07-16 09:21:26

标签: tensorflow gpu bazel

我正在使用带有ubuntu 16的服务器,并为我的用户安装了python 3.6

在以root用户身份安装cuda 10,cudnn7和其他必需的软件包之后,我从github克隆了tensorflow 2 beta,并成功运行了./configure命令。 但是,当我尝试使用bazel构建源代码时(作为普通用户) (使用以下命令:bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
我收到以下错误

  

错误:   /misc/home/thisuser/.cache/bazel/_bazel_thisuser/c065c6438711f6aa7a5cb8d6f2f657a0/external/protobuf_archive/BUILD:670:1:   C ++规则编译   '@protobuf_archive //:python / google / protobuf / internal / _api_implementation.so'   失败(退出1):crosstool_wrapper_driver_is_not_gcc失败:错误   执行命令(cd   /misc/home/thisuser/.cache/bazel/_bazel_thisuser/c065c6438711f6aa7a5cb8d6f2f657a0/execroot/org_tensorflow   && \执行环境-\       PATH = / home / thisuser / Python-3.6.3 / bin:/home/thisuser/Python-3.6.3:/ usr / local / sbin:/ usr / local / bin:/ usr / sbin:/ usr / bin: / sbin:/ bin:/ usr / games:/ usr / local / games:/ snap / bin:/ home / thisuser / bin:/ opt / jdk / bin   \       PWD = / proc /自我/ cwd \ external / local_config_cuda / crosstool / clang / bin / crosstool_wrapper_driver_is_not_gcc   -MD -MF bazel-out / host / bin / external / protobuf_archive / _objs / python / google / protobuf / internal / _api_implementation.so / api_implementation.pic.d   '-frandom-seed = bazel-out / host / bin / external / protobuf_archive / _objs / python / google / protobuf / internal / _api_implementation.so / api_implementation.pic.o'   -iquote external / protobuf_archive -iquote bazel-out / host / bin / external / protobuf_archive -iquote   external / local_config_python -iquote   bazel-out / host / bin / external / local_config_python -iquote   external / bazel_tools -iquote bazel-out / host / bin / external / bazel_tools   -isystem external / local_config_python / python_include -isystem bazel-out / host / bin / external / local_config_python / python_include   '-std = c ++ 11'-Wno-builtin-macro-redefined'-D__DATE __ =“ redacted”'   '-D__TIMESTAMP __ =“ redacted”''-D__TIME __ =“ redacted”'-fPIC   -U_FORTIFY_SOURCE'-D_FORTIFY_SOURCE = 1'-fstack-protector -Wall -fno-omit-frame-pointer -no-canonical-prefixs -fno-canonical-system-headers -DNDEBUG -g0 -O2 -ffunction-sections -fdata-sections -g0'-march = native'-g0 -DHAVE_PTHREAD -DHAVE_ZLIB -Wall -Woverloaded-virtual -Wno-sign-compare -Wno-unused-function -Wno-write-strings -DPYTHON_PROTO2_CPP_IMPL_V2 -c external / protobuf_archive / python protobuf / internal / api_implementation.cc   -o bazel-out / host / bin / external / protobuf_archive / _objs / python / google / protobuf / internal / _api_implementation.so / api_implementation.pic.o)   执行平台:@ bazel_tools // platforms:host_platform在文件中   来自   external / protobuf_archive / python / google / protobuf / internal / api_implementation.cc:31:0:   bazel-out / host / bin / external / local_config_python / python_include / Python.h:8:22:   严重错误:pyconfig.h:没有此类文件或目录的编译   终止。目标// tensorflow / tools / pip_package:build_pip_package   无法生成INFO:经过时间:169.767s,关键路径:30.68s   INFO:2251进程:2251本地。失败:构建未完成   成功

0 个答案:

没有答案