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

On a server without python3, python_grpclib_library fails with /usr/bin/env: 'python3': No such file or directory #399

Open
blockjon-dd opened this issue Jan 27, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@blockjon-dd
Copy link

Issue Description

I'm seeing the following error:

/usr/bin/env: 'python3': No such file or directory

when I try to build python_grpclib_library where the host does not have python.

Repro

To repro, make sure you run this on a machine where python3 is not installed globally.

Log Output

ERROR: /workspace/build/x/x/protos/public/payment/v0/BUILD.bazel:17:13: Compiling protoc outputs for grpclib_plugin plugin on target @@//protos/public/payment/v0:payment_v0_go_proto_python_grpc_compile_pb failed: (Exit 1): bash failed: error executing ProtoCompile command (from target //protos/public/payment/v0:payment_v0_go_proto_python_grpc_compile_pb) /bin/bash -c ... (remaining 8 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
/usr/bin/env: 'python3': No such file or directory
--grpclib_plugin_out: protoc-gen-grpclib_plugin: Plugin failed with status code 127.

rules_proto_grpc Version

5.0.1

Bazel Version

7.4.0

OS

Debian bookworm

Link to Demo Repo

No response

MODULE.bazel or WORKSPACE Content

bazel_dep(name = "rules_python", version = "0.37.2")
bazel_dep(name = "protobuf", version = "29.1", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_proto_grpc", version = "5.0.1")
bazel_dep(name = "rules_proto_grpc_python", version = "5.0.1")
bazel_dep(name = "rules_proto", version = "6.0.2")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(python_version = "3.11")

BUILD Content

load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_proto_grpc_python//:defs.bzl", "python_grpclib_library")

proto_library(
    name = "proto",
    srcs = [
        "addressbook.proto",
    ],
)

python_grpclib_library(
    name = "grpc_lib",
    protos = [
        ":proto",
    ],
)

Proto Content

syntax = "proto3";

package demo;

message Person {
  string name = 1;
  int32 id = 2;
  string email = 3;
}

Any Other Content


@blockjon-dd blockjon-dd added the bug Something isn't working label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant