我正试图按照tensorflow上的指南运行一个bazel命令,到目前为止,我一直没有成功。我正在使用Python版本3.5.0
使用网站指南正确安装和配置了Bazel,但没有效果。我总是收到同样的错误:
ERROR: in target '//external:cc_toolchain': no such package '@local_config_cc//': Traceback (most recent call last):
File "C:/users/username/appdata/local/temp/_bazel_username/ykvutwrt/external/bazel_tools/tools/cpp/cc_configure.bzl", line 32
configure_windows_toolchain(repository_ctx)
File "C:/users/username/appdata/local/temp/_bazel_username/ykvutwrt/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 365, in configure_windows_toolchain
tpl(repository_ctx, "CROSSTOOL", {"%{cpu...}": ""})
File "C:/users/username/appdata/local/temp/_bazel_username/ykvutwrt/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 377, in tpl
_get_escaped_windows_msys_crosstool_content(repository_ctx)
File "C:/users/username/appdata/local/temp/_bazel_username/ykvutwrt/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 34, in _get_escaped_windows_msys_crosstool_content
get_env_var(repository_ctx, "BAZEL_SH")
File "C:/users/username/appdata/local/temp/_bazel_username/ykvutwrt/external/bazel_tools/tools/cpp/lib_cc_configure.bzl", line 48, in get_env_var
auto_configure_fail(("'%s' environment variable is n...))
File "C:/users/username/appdata/local/temp/_bazel_username/ykvutwrt/external/bazel_tools/tools/cpp/lib_cc_configure.bzl", line 30, in auto_configure_fail
fail(("\n%sAuto-Configuration Error:%...)))
Auto-Configuration Error: 'BAZEL_SH' environment variable is not set我真的不知道该怎么做了。
发布于 2017-09-12 21:28:05
没有设置BAZEL_SH env,您是否运行了以下命令,如requirements部分所示?
还需要将BAZEL_SH环境变量设置为指向bash.exe。例如,在提示符(cmd.exe)中:
set BAZEL_SH=C:\msys64\usr\bin\bash.exe
您可能希望使用setx到永久设置环境变量来跨shell生活。
https://stackoverflow.com/questions/46181672
复制相似问题