ImportError: cannot import name 'shutdown_grpc_aio' from 'grpc._cython.cygrpc'

433 views
Skip to first unread message

Wong Kin Sun

unread,
Nov 14, 2022, 4:37:57 AM11/14/22
to grpc.io

Hi, I am following this tutorial on model deployment (https://codelabs.developers.google.com/vertex-image-deploy#6), but I ran into a issue when importing the aiplatform library which imports the grpc library.

When running "from google.cloud import aiplatform", I get the following error message:

ImportError: cannot import name 'shutdown_grpc_aio' from 'grpc._cython.cygrpc' (/opt/conda/lib/python3.7/site-packages/grpc/_cython/cygrpc.cpython-37m-x86_64-linux-gnu.so)

The entire error message can be found in the attached picture.

The versions of the libraries used are as shown:

google-api-core 2.10.1
google-api-python-client 2.55.0
google-cloud-aiplatform 1.17.0
grpcio 1.33.1
grpcio-gcp 0.2.2
grpcio-status 1.47.0

I would like to ask why the import error is occurring and how it can be resolved.

Thank you.

grpc_error_message.JPG

Richard Belleville

unread,
Nov 21, 2022, 5:44:22 PM11/21/22
to grpc.io

In general, this sort of error implies that the installed artifact's platform does not match that of the execution environment. I would check with the maintainers of the environment about this if the environment is supposed to handle the installation.
Reply all
Reply to author
Forward
0 new messages