python配置grpc环境

2026-01-12 08:42:20 作者:用户投稿

gRPC 的安装:

$ pip install grpcio

安装 ProtoBuf 相关的 python 依赖库:

$ pip install protobuf

安装 python grpc 的 protobuf 编译工具:

$ pip install grpcio-tools

测试

//源码路径 https://github.com/grpc/grpc
git clone https://github.com/grpc/grpc
cd grpc/examples/python/helloworld
python greeter_server.py //一个常驻服务

//启动客户端访问server
python greeter_client.py
//打印Greeter client received: Hello, you! 即为可以使用

猜你喜欢

联络方式:

400 9058 355

邮箱:8955556@qq.com

Q Q:8955556

微信二维码
在线咨询 拨打电话

电话

400 9058 355

微信二维码

微信二维码