I am trying to build the pip package for a certain 2.x version detailed here.
After running:
bazel build --config=dbg //tensorflow/tools/pip_package:build_pip_package --verbose_failures
I get the following message:
error executing shell command:
/bin/bash -c bazel-out/k8fafe98f9cd48032f8d6a9732902b210aba3b30f85849d3455fe9d9fb327/bin/tensorflow/tools/git/gen_git_source --generate "$@" --git_tag_led (Exit 127): bash failed: error executing command
(cd /home/john/.cache/bazel/_bazel_john/d320ed9b7367c72a32244d7a65335602/execroot/org_tensorflow && \
exec env - \
PATH=/home/john/.cache/bazelisk/downloads/bazelbuild/bazel-3.1.0-linux-x86_64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbigames:/usr/local/games:/snap/bin \
/bin/bash -c 'bazel-out/k8-opt-exec-50AE0418-ST-e0f78fafe98f9cd48032f8d6a9732902b210aba3b30f85849d3455fe9d9fb327/bin/tensorfe --generate "$@" --git_tag_override=${GIT_TAG_OVERRIDE:-}' '' external/local_config_git/gen/spec.json external/local_config_gconfig_git/gen/branch_ref bazel-out/k8-opt-exec-50AE0418/bin/tensorflow/core/util/version_info.cc)
Execution platform: @local_execution_config_platform//:platform
/usr/bin/env: 'python': No such file or directory
and indeed version_info.cc is not generated... the basel version is 3.1.0
Does anyone have any ideas?
CodePudding user response:
It could be either because python
is not installed, or it is not linked to /usr/bin/python
. The latter can be fixed by sudo ln -s /usr/bin/python3 /usr/bin/python
.