我试图从源代码构建tensorflow 1.13.1,但是失败了,错误如下:
ERROR: Skipping '//tensorflow:libtensorflow_cc.so': error loading package 'tensorflow': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '@local_config_cuda//cuda': Traceback (most recent call last):
File "C:/d/tensorflow-1.13.1/source/third_party/gpus/cuda_configure.bzl", line 1556
_create_local_cuda_repository(repository_ctx)
File "C:/d/tensorflow-1.13.1/source/third_party/gpus/cuda_configure.bzl", line 1395, in _create_local_cuda_repository
find_cc(repository_ctx)
File "C:/d/tensorflow-1.13.1/source/third_party/gpus/cuda_configure.bzl", line 239, in find_cc
_get_msvc_compiler(repository_ctx)
File "C:/d/tensorflow-1.13.1/source/third_party/gpus/cuda_configure.bzl", line 156, in _get_msvc_compiler
find_msvc_tool(repository_ctx, vc_path, "cl.exe").replace("\\", "/")
type 'NoneType' has no method replace(string, string)
WARNING: Target pattern parsing failed.
ERROR: error loading package 'tensorflow': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '@local_config_cuda//cuda': Traceback (most recent call last):
File "C:/d/tensorflow-1.13.1/source/third_party/gpus/cuda_configure.bzl", line 1556
_create_local_cuda_repository(repository_ctx)
File "C:/d/tensorflow-1.13.1/source/third_party/gpus/cuda_configure.bzl", line 1395, in _create_local_cuda_repository
find_cc(repository_ctx)
File "C:/d/tensorflow-1.13.1/source/third_party/gpus/cuda_configure.bzl", line 239, in find_cc
_get_msvc_compiler(repository_ctx)
File "C:/d/tensorflow-1.13.1/source/third_party/gpus/cuda_configure.bzl", line 156, in _get_msvc_compiler
find_msvc_tool(repository_ctx, vc_path, "cl.exe").replace("\\", "/")
type 'NoneType' has no method replace(string, string)
似乎Bazel无法将@local_config_cuda \\ cuda识别为包。 为什么?那我该怎么办?