1. 在清华网站下载软件 https://pypi.tuna.tsinghua.edu.cn/simple/
下载grpcio 和 grpc的python工具包 grpcio-tools(可直接下载.whl文件)
2. 安装
pip instal .whl文件
注意:grpcio 还依赖包protobuf 和 包enum34.
3. 使用
编译.proto文件
比如
python -m grpc_tools.protoc -I../../protos --python_out=. --grpc_python_out=. ../../protos/helloworld.proto
python -m grpc_tools.protoc -I proto文件所在目录 --python_out=输出目录 --grpc_python_out=输出目录 指定proto文件