我想从Google NLP API运行脚本:
https://cloud.google.com/natural-language/docs/analyzing-entities
我得到以下错误:
Traceback (most recent call last):
File "/Users/myuser/Desktop/g.py", line 1, in <module>
from google.cloud import language_v1
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/google/cloud/language_v1/__init__.py", line 19, in <module>
from google.cloud.language_v1.gapic import language_service_client
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/google/cloud/language_v1/gapic/language_service_client.py", line 24, in <module>
import google.api_core.gapic_v1.client_info
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/google/api_core/gapic_v1/__init__.py", line 26, in <module>
from google.api_core.gapic_v1 import method_async # noqa: F401
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/google/api_core/gapic_v1/method_async.py", line 20, in <module>
from google.api_core import general_helpers, grpc_helpers_async
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/google/api_core/grpc_helpers_async.py", line 145, in <module>
class _WrappedStreamUnaryCall(_WrappedUnaryResponseMixin, _WrappedStreamRequestMixin, aio.StreamUnaryCall):
AttributeError: module 'grpc.experimental.aio' has no attribute 'StreamUnaryCall'
[Finished in 1.6s with exit code 1]
[cmd: ['/Library/Frameworks/Python.framework/Versions/3.8/bin/python3', '-u', '/Users/myuser/Desktop/g.py']]
[dir: /Users/myuser/Desktop]
[path: /Users/myuser/opt/miniconda3/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin]
我还意识到它在路径“miniconda3”中显示,但我已经卸载了miniconda3
有什么帮助吗?谢谢大家!
我在库https://pypi.org/project/grpcio/中的一个错误中意识到了这一点
要解决此问题,您需要安装最新版本:
pip3安装grpcio==1.32.0
你完成了:)
相关问题 更多 >
编程相关推荐