在启动python3服务时,提示缺少google模块

[root@643578633c10 src]# python3 server_start.py 
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/tritonclient/grpc/__init__.py", line 29, in <module>
    from tritonclient.grpc import model_config_pb2
  File "/usr/local/lib/python3.6/site-packages/tritonclient/grpc/model_config_pb2.py", line 5, in <module>
    from google.protobuf.internal import enum_type_wrapper
ModuleNotFoundError: No module named 'google'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "server_start.py", line 30, in <module>
    from routers import ocr_router
  File "/app/server_ocr/src/routers/ocr_router.py", line 17, in <module>
    from modules.service import temp_service, item_request_service
  File "/app/server_ocr/src/modules/service/item_request_service.py", line 15, in <module>
    from modules.response.post_table_model import Table2HTMLPredictor, get_response
  File "/app/server_ocr/src/modules/response/post_table_model.py", line 12, in <module>
    import tritonclient.grpc as grpcclient
  File "/usr/local/lib/python3.6/site-packages/tritonclient/grpc/__init__.py", line 45, in <module>
    'package to include the support') from error
RuntimeError: The installation does not include grpc support. Specify 'grpc' or 'all' while installing the tritonclient package to include the support

解决办法

python3 -m pip install google-api-python-client
END

本文标题:执行python3服务时提示ModuleNotFoundError: No module named 'google'

本文作者:宇宙最帅的男人

本文链接:https://lolicp.com/python/202318590.html

版权声明:转载或者引用本文内容请注明来源及原作者,本文著作权归作者 (宇宙最帅的男人) 所有。

除非另有说明,本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议

最后修改:2023 年 07 月 18 日
如果觉得我的文章对你有用,请随意赞赏