#24084·protobuf

Bazel: Protobuf v33 (python) requires @system_python

Author: MizuxCreated Oct 20, 2025Updated Sep 10, 2026
Labelspythonbazel

What version of protobuf and what language are you using? Version: v33.0/v33.1 Language: C++ (pybind11) + Python Build System: Bazel 8.4.2 (bzlmod)

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

  • amd64*Linux
  • amd64*MacOS
  • amd64*Windows
  • aarch64*MacOS

ref:

What runtime / compiler are you using (e.g., python version or gcc version) tested against Python 3.12/3.13

What did you do? easy to reproduce using this MVE: https://github.com/Mizux/bazel-pybind11-protobuf (branch mizux/dev)

git clone --depth 1 -b dev https://github.com/Mizux/bazel-pybind11-protobuf
cd bazel-pybind11-protobuf
bazel build //bp11/foo/python:all

What did you expect to see Build pass

What did you see instead?

ERROR: no such package '@@[unknown repo 'system_python' requested from @@protobuf+]//': The repository '@@[unknown repo 'system_python' requested from @@protobuf+]' could not be resolved: No repository visible as '@system_python' from repository '@@protobuf+'
ERROR: /usr/local/google/home/corentinl/.cache/bazel/_bazel_corentinl/0894f505b0c1ca0afddf1fd7c7733baa/external/protobuf+/python/BUILD.bazel:14:14: no such package '@@[unknown repo 'system_python' requested from @@protobuf+]//': The repository '@@[unknown repo 'system_python' requested from @@protobuf+]' could not be resolved: No repository visible as '@system_python' from repository '@@protobuf+' and referenced by '@@protobuf+//python:proto_api'
ERROR: Analysis of target '//bp11/foo/python:pyfoo_copy_so_to_pyd' failed; build aborted: Analysis failed
INFO: Elapsed time: 2.514s, Critical Path: 0.03s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment

  • perfectly working using Protobuf v32.0 (see main branch).

  • perfectly working using Protobuf v33.0 and CMake based build (see dev branch).

  • https://github.com/Mizux/bazel-proto (no python) Perfectly work against v33.0 on both build Systems...

Spotted some traces of system_python in rules_python 1.7.0 changelog....... which is not released yet ! ref:

Source: protocolbuffers/protobuf