#41755·grpc

[Python] Build fails against protobuf v34

Author: strophyCreated Feb 28, 2026Updated Sep 16, 2026
Labelskind/enhancementlang/Pythonpriority/P2disposition/never stale

What version of gRPC and what language are you using?

1.78.1

What operating system (Linux, Windows,...) and version?

Alpine Linux 3.23.3

What runtime / compiler are you using (e.g. python version or version of gcc)

Python 3.12.12, gcc 15.2.0

What did you do?

Attempt to build grpc against protobuf v34

What did you expect to see?

Build success

What did you see instead?

2026-02-28 10:03:36,229 root INFO c++ -Os -fstack-clash-protection -Wformat -Werror=format-security -D_GLIBCXX_ASSERTIONS=1 -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1 -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST -fno-plt -flto=auto -DNDEBUG -O2 -fPIC -DHAVE_PTHREAD=1 -I. -Igrpc_root -Igrpc_root/include -I/usr/include/python3.12 -c grpc_tools/main.cc -o build/temp.linux-x86_64-cpython-312/grpc_tools/main.o -std=c++17 -DPROTOBUF_USE_DLLS -DNOMINMAX
grpc_tools/main.cc:20:10: fatal error: google/protobuf/compiler/python/generator.h: No such file or directory
   20 | #include <google/protobuf/compiler/python/generator.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Anything else we should know about your project / environment?

It looks like this is a breaking change in protobuf v34 introduced in https://github.com/protocolbuffers/protobuf/pull/25326