Search code examples
pythongoogle-cloud-platformgoogle-colaboratory

Unable to import google.cloud.kms_v1 in a Co-lab notebook


I am trying to import the google.cloud.kms_v1 library in a Co-Lab notebook.

However, when I run the command from google.cloud import kms_v1, I get the following error:

ImportError: cannot import name 'kms_v1'

I was able to successfully import other APIs from the google.cloud library, such as storage


Solution

  • Have you installed the library?

    Prior to import, run:

    pip install --upgrade "google-cloud-kms"