google-deepmind / lab

A customisable 3D platform for agent-based AI research
Other
7.13k stars 1.37k forks source link

some Error no issue mentioned #250

Open Idolphint opened 5 months ago

Idolphint commented 5 months ago

exec ${PAGER:-/usr/bin/less} "$0" || exit 1 Executing tests from //python/tests:python_module_test

Traceback (most recent call last): File "/home/ltt/.cache/bazel/_bazel_ltt/4f8fc013420b042f2377cab8a8114977/sandbox/linux-sandbox/961/execroot/org_deepmind_lab/bazel-out/k8-opt/bin/python/tests/python_module_test.runfiles/org_deepmind_lab/python/tests/dmlab_module_test.py", line 23, in from absl.testing import absltest File "/home/ltt/.cache/bazel/_bazel_ltt/4f8fc013420b042f2377cab8a8114977/sandbox/linux-sandbox/961/execroot/org_deepmind_lab/bazel-out/k8-opt/bin/python/tests/python_module_test.runfiles/com_google_absl_py/absl/testing/absltest.py", line 564 tempfile_cleanup: TempFileCleanup = TempFileCleanup.ALWAYS ^ SyntaxError: invalid syntax

check your python version > 3.5 (python=3.7 is ok)

ERROR: /home/ltt/ljf_test/lab/python/tests/BUILD:18:8: error loading package '@com_google_absl_py//absl/testing': Unable to find package for @rules_python//python:py_test.bzl: The repository '@rules_python' could not be resolved: Repository '@rules_python' is not defined. and referenced by '//python/tests:python_module_test' ERROR: Analysis of target '//python/tests:python_module_test' failed; build aborted: Analysis failed

add http_archive rules_python into WORKSPACE, following the instruction in https://github.com/bazelbuild/rules_python/releases

3. be careful to select your bazel version, now bazel==6.4.0 is ok, too high or too low cannot be work(i am using ubuntu18.04+python3.7)

tkoeppe commented 5 months ago

Could you make sure to use a recent version of Bazel, too?