51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

执行python3服务时提示ModuleNotFoundError: No module named 'google'

在启动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
赞(0)
未经允许不得转载:工具盒子 » 执行python3服务时提示ModuleNotFoundError: No module named 'google'