{"id":27260,"library":"protoc-wheel-0","title":"protoc-wheel-0","description":"A Python wheel distribution of the Protocol Buffers compiler (protoc), version 30.2. This package provides the protoc binary as a platform-dependent wheel, allowing easy installation without needing to download from GitHub. It is updated regularly to match protobuf releases.","status":"active","version":"30.2","language":"python","source_language":"en","source_url":"https://github.com/protocolbuffers/protobuf","tags":["protobuf","protoc","compiler","grpc"],"install":[{"cmd":"pip install protoc-wheel-0==30.2","lang":"bash","label":"Install specific version"}],"dependencies":[],"imports":[{"note":"This package provides a command-line tool, not a Python module. Users often expect to import something like 'protoc' but there is no importable module.","wrong":"","symbol":"main","correct":"No Python import; use CLI: protoc"}],"quickstart":{"code":"# After installation, protoc is available as a command-line tool.\n# Example: generate Python code from .proto file\n# Create a sample proto file first: echo 'syntax = \"proto3\"; message Test { string name = 1; }' > test.proto\nimport subprocess\nsubprocess.run(['protoc', '--python_out=.', 'test.proto'], check=True)\nprint('Generated test_pb2.py')","lang":"python","description":"Demonstrates using protoc via subprocess after pip install."},"warnings":[{"fix":"Use subprocess.run(['protoc', ...]) or shell call.","message":"protoc-wheel-0 provides a protoc binary, not a Python module. Do not attempt to import it in Python code; use subprocess or shell commands.","severity":"gotcha","affected_versions":"all"},{"fix":"Switch to grpcio-tools (which includes protoc) or download official protoc from https://github.com/protocolbuffers/protobuf/releases.","message":"The protoc-wheel-0 package is a third-party wheel distribution. For official protoc binaries, consider downloading from GitHub releases or using the protobuf compiler included in the grpcio-tools package.","severity":"deprecated","affected_versions":"all"},{"fix":"Install matching protobuf: pip install protobuf==30.2","message":"The version number of protoc-wheel-0 matches the protobuf release version (30.2). Ensure that the protoc version is compatible with the protobuf Python package you are using (e.g., protobuf==30.2).","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"protoc is a command-line tool, not a Python module. Use subprocess or shell.","cause":"Attempting to import 'protoc' in Python code.","error":"ImportError: No module named protoc"},{"fix":"Install the protobuf system library or use a static build. Alternatively, use grpcio-tools which statically links protoc.","cause":"The protoc binary from the wheel may have dynamic library dependencies not present on the system.","error":"protoc: error while loading shared libraries: libprotobuf.so.30: cannot open shared object file"},{"fix":"Ensure both protoc-wheel-0 and protobuf are the same major.minor version: pip install protobuf==30.2","cause":"Mismatch between protoc and protobuf runtime versions.","error":"Version mismatch: protoc version 30.2 but protobuf Python package is 4.25.3"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}