本文主要是介绍Error when import grpc: Symbol not found: _deflate解决方法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Import grpc时出现如下错误:
Traceback (most recent call last):File "/private/var/tmp/_bazel_lls/5ea0bb16383fa9c06c47b535a23ac475/execroot/ttsbot/bazel-out/darwin-opt/bin/client/tts_client.runfiles/ttsbot/client/tts_client.py", line 7, in <module>import grpcFile "/anaconda3/lib/python3.6/site-packages/grpc/__init__.py", line 22, in <module>from grpc._cython import cygrpc as _cygrpc
ImportError: dlopen(/anaconda3/lib/python3.6/site-packages/grpc/_cython/cygrpc.cpython-36m-darwin.so, 2): Symbol not found: _deflateReferenced from: /anaconda3/lib/python3.6/site-packages/grpc/_cython/cygrpc.cpython-36m-darwin.soExpected in: flat namespacein /anaconda3/lib/python3.6/site-packages/grpc/_cython/cygrpc.cpython-36m-darwin.so
最终解决方法为在anaconda中安装grpcio,命令为:
$ conda install grpcio
这篇关于Error when import grpc: Symbol not found: _deflate解决方法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!