Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

ImportError: cannot import name 'console_utils' from 'google.cloud.aiplatform.utils' (/home/jupyter/

hgp
Bronze 1
Bronze 1

I was trying to work on this lab : https://codelabs.developers.google.com/vertex-pipelines-intro#3.

I tried installing the same package names as mentioned in the lab. When I ran the Import cell, it returned this error.

Here's the screenshot of the full error msg.

hgp_0-1721302333385.png

Can Someone help with debugging this? I feel its a package compatibility issue but not able to exactly pin point it.

0 1 520
1 REPLY 1

Hi @hgp,

Welcome to Google Cloud Community!

It seems that the console_utils does not exist when you tried installing the google.cloud.aiplatform.utils library. I tried to replicate the issue but I wasn’t able to reproduce the same issue you’re having on my end.

With this, could you try running the following commands again in your notebook and make sure to restart the kernel after installing these packages:

!pip3 install {USER_FLAG} google-cloud-aiplatform==1.7.0 --upgrade
!pip3 install {USER_FLAG} kfp==1.8.9 google-cloud-pipeline-components==0.2.0

Then run the following commands to verify if the packages are installed correctly

!python3 -c "import kfp; print('KFP SDK version: {}'.format(kfp.__version__))"
!python3 -c "import google_cloud_pipeline_components; print('google_cloud_pipeline_components version {}'.format(google_cloud_pipeline_components.__version__))"

Make sure that the output is similar below:

KFP SDK version: 1.8.9
google_cloud_pipeline_components version: 0.2.0

Once done, you should now be able to import the libraries successfully.

Hope this helps.