Skip to content

Using venvs_site_packages=yes results in overlapping action output paths error#3204

Description

@hartikainen

馃悶 bug report

Affected Rule

The issue is caused by the rule: py_test/py_binary/py_library when using venvs_site_packages=yes

Is this a regression?

No, I don't think so. Indeed, I'm aware that vens_site_packages=yes is still experimental, meaning that feature request might be a more fitting category than bug for this.

Description

I'm unable to run py_{test,binary,library} targets with simple requirements.txt containing just mujoco and mujoco-mjx. I get:

ERROR: One of the output paths 'bazel-out/k8-fastbuild/bin/_mujoco_test.venv/lib/python3.12/site-packages/mujoco' (belonging to //:mujoco_test) and 'bazel-out/k8-fastbuild/bin/_mujoco_test.venv/lib/python3.12/site-packages/mujoco/mjx' (belonging to //:mujoco_test) is a prefix of the other. These actions cannot be simultaneously present; please rename one of the output files or build just one of them

馃敩 Minimal Reproduction

main...hartikainen:mujoco-example

馃敟 Exception or Error

$ bazel test //:mujoco_test
WARNING: Build option --incompatible_default_to_explicit_init_py has changed, discarding analysis cache (this can be expensive, see https://bazel.build/advanced/performance/iteration-speed).
ERROR: One of the output paths 'bazel-out/k8-fastbuild/bin/_mujoco_test.venv/lib/python3.12/site-packages/mujoco' (belonging to //:mujoco_test) and 'bazel-out/k8-fastbuild/bin/_mujoco_test.venv/lib/python3.12/site-packages/mujoco/mjx' (belonging to //:mujoco_test) is a prefix of the other. These actions cannot be simultaneously present; please rename one of the output files or build just one of them
Target //:mujoco_test failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: One of the output paths 'bazel-out/k8-fastbuild/bin/_mujoco_test.venv/lib/python3.12/site-packages/mujoco' (belonging to //:mujoco_test) and 'bazel-out/k8-fastbuild/bin/_mujoco_test.venv/lib/python3.12/site-packages/mujoco/mjx' (belonging to //:mujoco_test) is a prefix of the other. These actions cannot be simultaneously present; please rename one of the output files or build just one of them
INFO: Elapsed time: 0.177s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: No test targets were found, yet testing was requested

馃實 Your Environment

Operating System:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.2 LTS
Release:        24.04
Codename:       noble

Output of bazel version:

$ bazel --version
bazel 8.2.1

Rules_python version:

fe45faa

Anything else relevant?

Related to #2156.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions