google-deepmind / code_contests

Apache License 2.0
2.1k stars 208 forks source link

no such attribute 'env' in 'py_binary' rule #3

Closed uSaiPrashanth closed 2 years ago

uSaiPrashanth commented 2 years ago

I followed instructions detailed in a kaggle kernal. However, I encountered the titled error.

Bazel output:

Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    Fetching ...c_grpc; Cloning tags/v1.38.1 of [https://github.com/grpc/grpc.g\](https://github.com/grpc/grpc.g/)
it
Loading: 0 packages loaded
    Fetching ...c_grpc; Cloning tags/v1.38.1 of [https://github.com/grpc/grpc.g\](https://github.com/grpc/grpc.g/)
it
Loading: 0 packages loaded
    Fetching ...c_grpc; Cloning tags/v1.38.1 of [https://github.com/grpc/grpc.g\](https://github.com/grpc/grpc.g/)
it
Loading: 0 packages loaded
    Fetching ...c_grpc; Cloning tags/v1.38.1 of [https://github.com/grpc/grpc.g\](https://github.com/grpc/grpc.g/)
it
Loading: 0 packages loaded
    Fetching ...c_grpc; Cloning tags/v1.38.1 of [https://github.com/grpc/grpc.g\](https://github.com/grpc/grpc.g/)
it 4s
Loading: 0 packages loaded
    Fetching ...c_grpc; Cloning tags/v1.38.1 of [https://github.com/grpc/grpc.g\](https://github.com/grpc/grpc.g/)
it 5s
Loading: 0 packages loaded
    Fetching @com_github_grpc_grpc; Recording actual commit 5s
DEBUG: Rule 'com_github_grpc_grpc' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "96b73272eadc01afb5fb45b92b408c47e4387274", shallow_since = "1624063996 -0700" and dropping ["tag"]
Loading: 0 packages loaded
DEBUG: Repository com_github_grpc_grpc instantiated at:
  /kaggle/working/code_contests/WORKSPACE:4:15: in <toplevel>
Repository rule git_repository defined at:
  /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
    Fetching @rules_proto; fetching
Loading: 0 packages loaded
    currently loading: 
    Fetching @rules_proto; fetching
    Fetching https://mirror.bazel.build/...595af3900dd85cb3a29ad28cc313.tar.gz
Analyzing: target //:print_names_and_sources (1 packages loaded)
Analyzing: target //:print_names_and_sources (1 packages loaded, 0 targets con\
figured)
Analyzing: target //:print_names_and_sources (2 packages loaded, 1 target conf\
igured)
    currently loading: @bazel_tools//tools/cpp
    Fetching @rules_cc; fetching
Analyzing: target //:print_names_and_sources (6 packages loaded, 2 targets con\
figured)
Analyzing: target //:print_names_and_sources (9 packages loaded, 14 targets co\
nfigured)
    currently loading: @bazel_tools//tools/sh
Analyzing: target //:print_names_and_sources (12 packages loaded, 18 targets c\
onfigured)
    Fetching @local_config_cc; fetching
    Fetching @com_google_riegeli; fetching
Analyzing: target //:print_names_and_sources (12 packages loaded, 18 targets c\
onfigured)
    Fetching @local_config_cc; fetching
    Fetching @com_google_riegeli; fetching
    Fetching https://github.com/...7921700a58f53fbd2b47fcf9c6dc38477a32.tar.gz
Analyzing: target //:print_names_and_sources (12 packages loaded, 18 targets c\
onfigured)
    Fetching @local_config_cc; fetching
    Fetching @com_google_riegeli; fetching
    Fetching https://github.com/...f53fbd2b47fcf9c6dc38477a32.tar.gz; 154,274B
Analyzing: target //:print_names_and_sources (12 packages loaded, 18 targets c\
onfigured)
    Fetching @local_config_cc; fetching
    Fetching @com_google_riegeli; fetching
    Fetching ...iegeli; Extracting /root/.cache/bazel/_bazel_root/3be79ad75151\
b6763eed16d084c75f7d/external/com_google_riegeli/temp11287151664443332764/587c\
7921700a58f53fbd2b47fcf9c6dc38477a32.tar.gz
Analyzing: target //:print_names_and_sources (13 packages loaded, 18 targets c\
onfigured)
    Fetching @local_config_cc; fetching
Analyzing: target //:print_names_and_sources (19 packages loaded, 57 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
    Fetching ...otobuf; Cloning tags/v3.19.3 of [https://github.com/protocolbuf\](https://github.com/protocolbuf/)
fers/protobuf.git
Analyzing: target //:print_names_and_sources (20 packages loaded, 77 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
    Fetching ...otobuf; Cloning tags/v3.19.3 of [https://github.com/protocolbuf\](https://github.com/protocolbuf/)
fers/protobuf.git
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
    Fetching ...otobuf; Cloning tags/v3.19.3 of [https://github.com/protocolbuf\](https://github.com/protocolbuf/)
fers/protobuf.git
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
    Fetching ...otobuf; Cloning tags/v3.19.3 of [https://github.com/protocolbuf\](https://github.com/protocolbuf/)
fers/protobuf.git
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
    Fetching ...otobuf; Cloning tags/v3.19.3 of [https://github.com/protocolbuf\](https://github.com/protocolbuf/)
fers/protobuf.git
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
    Fetching @com_google_protobuf; Recording actual commit
DEBUG: Rule 'com_google_protobuf' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "cc7b1b53234cd7a8f50d90ac3933b240dcf4cd97", shallow_since = "1641866895 -0800" and dropping ["tag"]
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
DEBUG: Repository com_google_protobuf instantiated at:
  /kaggle/working/code_contests/WORKSPACE:22:15: in <toplevel>
Repository rule git_repository defined at:
  /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records ... (2 pack\
ages)
    Fetching ...python; Cloning tags/0.5.0 of [https://github.com/bazelbuild/ru\](https://github.com/bazelbuild/ru/)
les_python.git
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records ... (2 pack\
ages)
    Fetching ...python; Cloning tags/0.5.0 of [https://github.com/bazelbuild/ru\](https://github.com/bazelbuild/ru/)
les_python.git
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records ... (2 pack\
ages)
    Fetching @rules_python; Recording actual commit
DEBUG: Rule 'rules_python' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "76ef44fdb8aaa8d5c607721ffe1b1cbf1e8f08dd", shallow_since = "1635214215 -0700" and dropping ["tag"]
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records ... (2 pack\
ages)
DEBUG: Repository rules_python instantiated at:
  /kaggle/working/code_contests/WORKSPACE:14:15: in <toplevel>
Repository rule git_repository defined at:
  /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records ... (2 pack\
ages)
Analyzing: target //:print_names_and_sources (25 packages loaded, 89 targets c\
onfigured)
    currently loading: @com_google_protobuf//
    Fetching ...e_absl; Cloning tags/20211102.0 of [https://github.com/abseil/a\](https://github.com/abseil/a/)
bseil-cpp.git
    Fetching @local_config_python; fetching
Analyzing: target //:print_names_and_sources (26 packages loaded, 101 targets \
configured)
    Fetching ...e_absl; Cloning tags/20211102.0 of [https://github.com/abseil/a\](https://github.com/abseil/a/)
bseil-cpp.git
Analyzing: target //:print_names_and_sources (28 packages loaded, 279 targets \
configured)
    Fetching ...e_absl; Cloning tags/20211102.0 of [https://github.com/abseil/a\](https://github.com/abseil/a/)
bseil-cpp.git
    Fetching @zlib; fetching
Analyzing: target //:print_names_and_sources (28 packages loaded, 279 targets \
configured)
    Fetching ...e_absl; Cloning tags/20211102.0 of [https://github.com/abseil/a\](https://github.com/abseil/a/)
bseil-cpp.git
    Fetching @zlib; fetching
    Fetching http://zlib.net/fossils/zlib-1.2.11.tar.gz
Analyzing: target //:print_names_and_sources (29 packages loaded, 400 targets \
configured)
    Fetching ...e_absl; Cloning tags/20211102.0 of [https://github.com/abseil/a\](https://github.com/abseil/a/)
bseil-cpp.git
DEBUG: Rule 'com_google_absl' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "215105818dfde3174fe799600bb0f3cae233d0bf", shallow_since = "1635953174 -0400" and dropping ["tag"]
Analyzing: target //:print_names_and_sources (29 packages loaded, 633 targets \
configured)
DEBUG: Repository com_google_absl instantiated at:
  /kaggle/working/code_contests/WORKSPACE:28:15: in <toplevel>
Repository rule git_repository defined at:
  /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
Analyzing: target //:print_names_and_sources (29 packages loaded, 633 targets \
configured)
Analyzing: target //:print_names_and_sources (35 packages loaded, 646 targets \
configured)
    currently loading: @rules_python//python ... (2 packages)
ERROR: /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/rules_python/python/BUILD:144:25: @rules_python//python:requirements.update: no such attribute 'env' in 'py_binary' rule
Analyzing: target //:print_names_and_sources (37 packages loaded, 646 targets \
configured)
ERROR: /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/rules_python/python/BUILD:144:25: @rules_python//python:requirements_test: no such attribute 'env' in 'py_test' rule
Analyzing: target //:print_names_and_sources (37 packages loaded, 646 targets \
configured)
Analyzing: target //:print_names_and_sources (43 packages loaded, 773 targets \
configured)
    currently loading: @com_google_absl//absl/container
ERROR: /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/local_config_python/BUILD:16:15: Target '@rules_python//python:python_version' contains an error and its package is in error and referenced by '@local_config_python//:python3'
Analyzing: target //:print_names_and_sources (52 packages loaded, 915 targets \
configured)
    Fetching @highwayhash; fetching
Analyzing: target //:print_names_and_sources (52 packages loaded, 916 targets \
configured)
    Fetching @highwayhash; fetching
Analyzing: target //:print_names_and_sources (52 packages loaded, 916 targets \
configured)
    Fetching @highwayhash; fetching
    Fetching https://github.com/...76dd7b4b6d330e4734b756e97ccfb1b69cc2e12.zip
INFO: Repository highwayhash instantiated at:
  /kaggle/working/code_contests/WORKSPACE:86:13: in <toplevel>
Repository rule http_archive defined at:
  /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
Analyzing: target //:print_names_and_sources (52 packages loaded, 916 targets \
configured)
    Fetching @highwayhash; fetching
ERROR: While resolving configuration keys for @local_config_python//:python_headers: Analysis failed
Analyzing: target //:print_names_and_sources (52 packages loaded, 916 targets \
configured)
ERROR: Analysis of target '//:print_names_and_sources' failed; build aborted: Analysis failed
Analyzing: target //:print_names_and_sources (52 packages loaded, 916 targets \
configured)
INFO: Elapsed time: 25.967s
Analyzing: target //:print_names_and_sources (52 packages loaded, 916 targets \
configured)
INFO: 0 processes.
Analyzing: target //:print_names_and_sources (52 packages loaded, 916 targets \
configured)
FAILED: Build did NOT complete successfully (52 packages loaded, 916 targets c\
onfigured)
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully (52 packages loaded, 916 targets c\
onfigured)Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    Fetching ...c_grpc; Cloning tags/v1.38.1 of [https://github.com/grpc/grpc.g\](https://github.com/grpc/grpc.g/)
it
Loading: 0 packages loaded
    Fetching ...c_grpc; Cloning tags/v1.38.1 of [https://github.com/grpc/grpc.g\](https://github.com/grpc/grpc.g/)
it
Loading: 0 packages loaded
    Fetching ...c_grpc; Cloning tags/v1.38.1 of [https://github.com/grpc/grpc.g\](https://github.com/grpc/grpc.g/)
it
Loading: 0 packages loaded
    Fetching ...c_grpc; Cloning tags/v1.38.1 of [https://github.com/grpc/grpc.g\](https://github.com/grpc/grpc.g/)
it
Loading: 0 packages loaded
    Fetching ...c_grpc; Cloning tags/v1.38.1 of [https://github.com/grpc/grpc.g\](https://github.com/grpc/grpc.g/)
it 4s
Loading: 0 packages loaded
    Fetching ...c_grpc; Cloning tags/v1.38.1 of [https://github.com/grpc/grpc.g\](https://github.com/grpc/grpc.g/)
it 5s
Loading: 0 packages loaded
    Fetching @com_github_grpc_grpc; Recording actual commit 5s
DEBUG: Rule 'com_github_grpc_grpc' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "96b73272eadc01afb5fb45b92b408c47e4387274", shallow_since = "1624063996 -0700" and dropping ["tag"]
Loading: 0 packages loaded
DEBUG: Repository com_github_grpc_grpc instantiated at:
  /kaggle/working/code_contests/WORKSPACE:4:15: in <toplevel>
Repository rule git_repository defined at:
  /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
    Fetching @rules_proto; fetching
Loading: 0 packages loaded
    currently loading: 
    Fetching @rules_proto; fetching
    Fetching https://mirror.bazel.build/...595af3900dd85cb3a29ad28cc313.tar.gz
Analyzing: target //:print_names_and_sources (1 packages loaded)
Analyzing: target //:print_names_and_sources (1 packages loaded, 0 targets con\
figured)
Analyzing: target //:print_names_and_sources (2 packages loaded, 1 target conf\
igured)
    currently loading: @bazel_tools//tools/cpp
    Fetching @rules_cc; fetching
Analyzing: target //:print_names_and_sources (6 packages loaded, 2 targets con\
figured)
Analyzing: target //:print_names_and_sources (9 packages loaded, 14 targets co\
nfigured)
    currently loading: @bazel_tools//tools/sh
Analyzing: target //:print_names_and_sources (12 packages loaded, 18 targets c\
onfigured)
    Fetching @local_config_cc; fetching
    Fetching @com_google_riegeli; fetching
Analyzing: target //:print_names_and_sources (12 packages loaded, 18 targets c\
onfigured)
    Fetching @local_config_cc; fetching
    Fetching @com_google_riegeli; fetching
    Fetching https://github.com/...7921700a58f53fbd2b47fcf9c6dc38477a32.tar.gz
Analyzing: target //:print_names_and_sources (12 packages loaded, 18 targets c\
onfigured)
    Fetching @local_config_cc; fetching
    Fetching @com_google_riegeli; fetching
    Fetching https://github.com/...f53fbd2b47fcf9c6dc38477a32.tar.gz; 154,274B
Analyzing: target //:print_names_and_sources (12 packages loaded, 18 targets c\
onfigured)
    Fetching @local_config_cc; fetching
    Fetching @com_google_riegeli; fetching
    Fetching ...iegeli; Extracting /root/.cache/bazel/_bazel_root/3be79ad75151\
b6763eed16d084c75f7d/external/com_google_riegeli/temp11287151664443332764/587c\
7921700a58f53fbd2b47fcf9c6dc38477a32.tar.gz
Analyzing: target //:print_names_and_sources (13 packages loaded, 18 targets c\
onfigured)
    Fetching @local_config_cc; fetching
Analyzing: target //:print_names_and_sources (19 packages loaded, 57 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
    Fetching ...otobuf; Cloning tags/v3.19.3 of [https://github.com/protocolbuf\](https://github.com/protocolbuf/)
fers/protobuf.git
Analyzing: target //:print_names_and_sources (20 packages loaded, 77 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
    Fetching ...otobuf; Cloning tags/v3.19.3 of [https://github.com/protocolbuf\](https://github.com/protocolbuf/)
fers/protobuf.git
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
    Fetching ...otobuf; Cloning tags/v3.19.3 of [https://github.com/protocolbuf\](https://github.com/protocolbuf/)
fers/protobuf.git
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
    Fetching ...otobuf; Cloning tags/v3.19.3 of [https://github.com/protocolbuf\](https://github.com/protocolbuf/)
fers/protobuf.git
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
    Fetching ...otobuf; Cloning tags/v3.19.3 of [https://github.com/protocolbuf\](https://github.com/protocolbuf/)
fers/protobuf.git
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
    Fetching @com_google_protobuf; Recording actual commit
DEBUG: Rule 'com_google_protobuf' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "cc7b1b53234cd7a8f50d90ac3933b240dcf4cd97", shallow_since = "1641866895 -0800" and dropping ["tag"]
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
DEBUG: Repository com_google_protobuf instantiated at:
  /kaggle/working/code_contests/WORKSPACE:22:15: in <toplevel>
Repository rule git_repository defined at:
  /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records ... (2 pack\
ages)
    Fetching ...python; Cloning tags/0.5.0 of [https://github.com/bazelbuild/ru\](https://github.com/bazelbuild/ru/)
les_python.git
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records ... (2 pack\
ages)
    Fetching ...python; Cloning tags/0.5.0 of [https://github.com/bazelbuild/ru\](https://github.com/bazelbuild/ru/)
les_python.git
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records ... (2 pack\
ages)
    Fetching @rules_python; Recording actual commit
DEBUG: Rule 'rules_python' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "76ef44fdb8aaa8d5c607721ffe1b1cbf1e8f08dd", shallow_since = "1635214215 -0700" and dropping ["tag"]
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records ... (2 pack\
ages)
DEBUG: Repository rules_python instantiated at:
  /kaggle/working/code_contests/WORKSPACE:14:15: in <toplevel>
Repository rule git_repository defined at:
  /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
Analyzing: target //:print_names_and_sources (20 packages loaded, 83 targets c\
onfigured)
    currently loading: @com_google_riegeli//python/riegeli/records ... (2 pack\
ages)
Analyzing: target //:print_names_and_sources (25 packages loaded, 89 targets c\
onfigured)
    currently loading: @com_google_protobuf//
    Fetching ...e_absl; Cloning tags/20211102.0 of [https://github.com/abseil/a\](https://github.com/abseil/a/)
bseil-cpp.git
    Fetching @local_config_python; fetching
Analyzing: target //:print_names_and_sources (26 packages loaded, 101 targets \
configured)
    Fetching ...e_absl; Cloning tags/20211102.0 of [https://github.com/abseil/a\](https://github.com/abseil/a/)
bseil-cpp.git
Analyzing: target //:print_names_and_sources (28 packages loaded, 279 targets \
configured)
    Fetching ...e_absl; Cloning tags/20211102.0 of [https://github.com/abseil/a\](https://github.com/abseil/a/)
bseil-cpp.git
    Fetching @zlib; fetching
Analyzing: target //:print_names_and_sources (28 packages loaded, 279 targets \
configured)
    Fetching ...e_absl; Cloning tags/20211102.0 of [https://github.com/abseil/a\](https://github.com/abseil/a/)
bseil-cpp.git
    Fetching @zlib; fetching
    Fetching http://zlib.net/fossils/zlib-1.2.11.tar.gz
Analyzing: target //:print_names_and_sources (29 packages loaded, 400 targets \
configured)
    Fetching ...e_absl; Cloning tags/20211102.0 of [https://github.com/abseil/a\](https://github.com/abseil/a/)
bseil-cpp.git
DEBUG: Rule 'com_google_absl' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "215105818dfde3174fe799600bb0f3cae233d0bf", shallow_since = "1635953174 -0400" and dropping ["tag"]
Analyzing: target //:print_names_and_sources (29 packages loaded, 633 targets \
configured)
DEBUG: Repository com_google_absl instantiated at:
  /kaggle/working/code_contests/WORKSPACE:28:15: in <toplevel>
Repository rule git_repository defined at:
  /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
Analyzing: target //:print_names_and_sources (29 packages loaded, 633 targets \
configured)
Analyzing: target //:print_names_and_sources (35 packages loaded, 646 targets \
configured)
    currently loading: @rules_python//python ... (2 packages)
ERROR: /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/rules_python/python/BUILD:144:25: @rules_python//python:requirements.update: no such attribute 'env' in 'py_binary' rule
Analyzing: target //:print_names_and_sources (37 packages loaded, 646 targets \
configured)
ERROR: /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/rules_python/python/BUILD:144:25: @rules_python//python:requirements_test: no such attribute 'env' in 'py_test' rule
Analyzing: target //:print_names_and_sources (37 packages loaded, 646 targets \
configured)
Analyzing: target //:print_names_and_sources (43 packages loaded, 773 targets \
configured)
    currently loading: @com_google_absl//absl/container
ERROR: /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/local_config_python/BUILD:16:15: Target '@rules_python//python:python_version' contains an error and its package is in error and referenced by '@local_config_python//:python3'
Analyzing: target //:print_names_and_sources (52 packages loaded, 915 targets \
configured)
    Fetching @highwayhash; fetching
Analyzing: target //:print_names_and_sources (52 packages loaded, 916 targets \
configured)
    Fetching @highwayhash; fetching
Analyzing: target //:print_names_and_sources (52 packages loaded, 916 targets \
configured)
    Fetching @highwayhash; fetching
    Fetching https://github.com/...76dd7b4b6d330e4734b756e97ccfb1b69cc2e12.zip
INFO: Repository highwayhash instantiated at:
  /kaggle/working/code_contests/WORKSPACE:86:13: in <toplevel>
Repository rule http_archive defined at:
  /root/.cache/bazel/_bazel_root/3be79ad75151b6763eed16d084c75f7d/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
Analyzing: target //:print_names_and_sources (52 packages loaded, 916 targets \
configured)
    Fetching @highwayhash; fetching
ERROR: While resolving configuration keys for @local_config_python//:python_headers: Analysis failed
Analyzing: target //:print_names_and_sources (52 packages loaded, 916 targets \
configured)
ERROR: Analysis of target '//:print_names_and_sources' failed; build aborted: Analysis failed
Analyzing: target //:print_names_and_sources (52 packages loaded, 916 targets \
configured)
INFO: Elapsed time: 25.967s
Analyzing: target //:print_names_and_sources (52 packages loaded, 916 targets \
configured)
INFO: 0 processes.
Analyzing: target //:print_names_and_sources (52 packages loaded, 916 targets \
configured)
FAILED: Build did NOT complete successfully (52 packages loaded, 916 targets c\
onfigured)
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully (52 packages loaded, 916 targets c\
onfigured)
uSaiPrashanth commented 2 years ago

This, however works well for the print_names.cc file

jtkeeling commented 2 years ago

Thanks for reporting your issue. Can I ask you to report the version of bazel you are running via bazel --version?

I did a search, and it looks like you might be hitting this issue: https://github.com/bazelbuild/rules_python/issues/522, i.e. you're on an old version of bazel that doesn't support the env argument to py_binary.

uSaiPrashanth commented 2 years ago

Thank you for the prompt response!! The current version of Bazel on the kernal is bazel 3.7.2

I'm not sure how to fix that Should I compile bazel from the source?

jtkeeling commented 2 years ago

It sounds like this is the root cause then.

I would recommend trying to update to a more up-to-date version of bazel, if possible. Precisely how to do this will depend on your system, but the official installation documentation should hopefully give you some pointers.

uSaiPrashanth commented 2 years ago

It worked!! Thank you very much for your kind support, and for releasing such an amazing dataset.

KareemAlaa2001 commented 2 years ago

@uSaiPrashanth what python version and machine are you using? If on mac, did you get bazel from homebrew?

uSaiPrashanth commented 2 years ago

@KareemAlaa2001 I was using it on kaggle. You can have a look at my notebook here. As you can see, you might have to do a bit of fiddling around to get things working...

Python version: 3.7.12 Bazel version: 5.0.0

And yes I built it from source

uSaiPrashanth commented 2 years ago

It does take quite a while to build code_contests tho so have fun ig.... :)