美文网首页
grpc demo error solution

grpc demo error solution

作者: dere | 来源:发表于2018-08-16 10:42 被阅读0次

[Mark] error solution

在运行官方quick start教程时,import grpc时报错,错误如下:

>python greeter_client.py 
Traceback (most recent call last):
File "greeter_client.py", line 18, in <module>
  import grpc
File "/Applications/anaconda3/lib/python3.6/site-packages/grpc/__init__.py", line 22, in <module>
  from grpc._cython import cygrpc as _cygrpc
ImportError: dlopen(/Applications/anaconda3/lib/python3.6/site-packages/grpc/_cython/cygrpc.cpython-36m-darwin.so, 2): Symbol not found: _deflate
Referenced from: /Applications/anaconda3/lib/python3.6/site-packages/grpc/_cython/cygrpc.cpython-36m-darwin.so
Expected in: flat namespace
in /Applications/anaconda3/lib/python3.6/site-packages/grpc/_cython/cygrpc.cpython-36m-darwin.so

解决方法:
使用conda进行安装,不实用官方推荐的安装方式

conda install grpcio

相关文章

网友评论

      本文标题:grpc demo error solution

      本文链接:https://www.haomeiwen.com/subject/sfenbftx.html