Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"execvp(python, ...)": No such file or directory #2801

Open
cpovirk opened this issue Aug 5, 2021 · 1 comment
Open

"execvp(python, ...)": No such file or directory #2801

cpovirk opened this issue Aug 5, 2021 · 1 comment

Comments

@cpovirk
Copy link
Member

cpovirk commented Aug 5, 2021

$ sudo apt-get remove python-is-python3

$ git checkout 509669d03755277e01ead42ab214b3d2b3a715e6

$ USE_BAZEL_VERSION=3.7.1 JAVA_HOME=/usr/local/buildtools/java/jdk8 ANDROID_HOME=/usr/local/google/home/cpovirk/android-sdk-linux "$(go env GOPATH)/bin/bazelisk" build //...
INFO: Repository maven instantiated at:
  /usr/local/google/home/cpovirk/clients/dagger-yellow/dagger/WORKSPACE:140:14: in <toplevel>
  /usr/local/google/home/cpovirk/.cache/bazel/_bazel_cpovirk/7cee73372ad52c17db7b6117de5a4f21/external/rules_jvm_external/defs.bzl:83:19: in maven_install
Repository rule coursier_fetch defined at:
  /usr/local/google/home/cpovirk/.cache/bazel/_bazel_cpovirk/7cee73372ad52c17db7b6117de5a4f21/external/rules_jvm_external/coursier.bzl:870:33: in <toplevel>
INFO: Repository 'maven' used the following cache hits instead of downloading the corresponding file.
 * Hash '17f4ff053d0d1dca588afdcc94ca952f7ed85bb03675cd77ec05b7352a832b86' for https://github.com/coursier/coursier/releases/download/v2.0.0-RC3/coursier.jar
If the definition of 'maven' was updated, verify that the hashes were also updated.
ERROR: An error occurred during the fetch of repository 'maven':
   Traceback (most recent call last):
        File "/usr/local/google/home/cpovirk/.cache/bazel/_bazel_cpovirk/7cee73372ad52c17db7b6117de5a4f21/external/rules_jvm_external/coursier.bzl", line 759, column 21, in _coursier_fetch_impl
                fail("Error while obtaining the sha256 checksum of "
Error in fail: Error while obtaining the sha256 checksum of v1/https/maven.google.com/androidx/activity/activity/1.2.2/activity-1.2.2.aar: src/main/tools/process-wrapper-legacy.cc:80: "execvp(python, ...)": No such file or directory
ERROR: /usr/local/google/home/cpovirk/clients/dagger-yellow/dagger/java/dagger/spi/model/BUILD:40:13: //java/dagger/spi/model:model depends on @maven//:com_google_devtools_ksp_symbol_processing_api in repository @maven which failed to fetch. no such package '@maven//': Error while obtaining the sha256 checksum of v1/https/maven.google.com/androidx/activity/activity/1.2.2/activity-1.2.2.aar: src/main/tools/process-wrapper-legacy.cc:80: "execvp(python, ...)": No such file or directory
ERROR: Analysis of target '//java/dagger/spi/model:model' failed; build aborted: Analysis failed
INFO: Elapsed time: 25.331s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)

I'm pretty sure this is not an issue in Dagger per se but rather bazel-contrib/rules_jvm_external#291.

That suggests that it could be resolved by updating some dependencies. When I first encountered this (a couple months ago), I tried updating just rules_jvm_external, but I still got the error, and I got the impression that maybe an old version of rules_jvm_external is still pulled transitively through rules_kotlin or something? Or maybe I did it wrong. Sorry, it's been a while since I initially encountered this, so I'm working from notes.

Fortunately, installing python-is-python3 (or putting an appropriate executable named python somewhere in your $PATH (or maybe alternatively at the location of $PYTHONPATH?) is a workaround.

@Chang-Eric
Copy link
Member

I think this is also bazelbuild/bazel#12485

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants