[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
网友评论