You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to also try to using the system protoc to compile, however, this fails due to grpc_python_plugin is not found.
$ protoc --version
libprotoc 3.5.1
$ protoc -I. --python_out=. --grpc_python_out=. --plugin=protoc-gen-grpc=`which grpc_python_plugin` helloworld.proto
protoc-gen-grpc_python: program not found or is not executable
--grpc_python_out: protoc-gen-grpc_python: Plugin failed with status code 1.
I then built grpc_python_plugin from gits, and it works fine.
gRPC Python's grpcio-tools package, unlike the other languages, does not ship protoc and grpc_python_plugin as separate binaries. They are combined together into a single Python extension module and accessible as documented and as you noted in your question. The main advantage of the way gRPC Python does things is that you can simply pip install it and fallback on building from source even if a prebuilt binary for your architecture is not available.
We do not distribute pre-built binaries for grpc_python_plugin, but you should be able to build it by taking the gRPC git source tree and building it:
$ git clone --recursive https://github.com/grpc/grpc
$ cd grpc && make plugins -j 12
$ ls bins/opt/grpc_python_plugin
From @iamnoah#26210 -
I would just comment on #15675 if it were not locked, but just wanted to point out there is an easy solution for those looking for a binary for the python gRPC plugin:
pip install grpclib protobuf
The plugin binary is then available as protoc-gen-grpclib_python or protoc-gen-python_grpc in the bin/ directory for your python env. (If you are using buf, it can be used as name: python_grpc or name: grpclib_python.)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am experimenting the python grpc hello world example.
gPRC tools is installed with python3.6 pip.
And compile using grpc tools as a python module works fine.
I would like to also try to using the system
protoc
to compile, however, this fails due to grpc_python_plugin is not found.I then built grpc_python_plugin from gits, and it works fine.
In summary, my questions:
PS:
I explored protoc with grpc plugins to compile python and javascript out together, which works fine.
Thank you very much!
The text was updated successfully, but these errors were encountered: