statmike / vertex-ai-mlops

Google Cloud Platform Vertex AI end-to-end workflows for machine learning operations
Apache License 2.0
494 stars 221 forks source link

ImportError: cannot import name 'aiplatform' from 'google.cloud' (unknown location) #24

Closed Nish2288 closed 1 year ago

Nish2288 commented 1 year ago

Getting import error in 02c notebook in vertex AI workbench in GCP. tensorflow version=2.3

Error: ImportError: cannot import name 'aiplatform' from 'google.cloud' (unknown location)

Nish2288 commented 1 year ago

able to resolve the issue. Run following: !pip3 install --upgrade --user -q google-cloud-aiplatform google-cloud-storage --user kfp google-cloud-pipeline-components

statmike commented 1 year ago

Hi @Nish2288, Thank you for reporting the issue and how you solved it. Did you run the 00-Environmemt Setup notebook before this happened?

Nish2288 commented 1 year ago

Hi Mike, yes i did run 00-setup notebook. I found that i was getting error importing 'aiplatform' module in vertex AI workbench notebook tensorflow 2.3 but working fine on tensorflow 2.8.

statmike commented 1 year ago

@Nish2288 I am having trouble recreating the issue you are experiencing. In the 00-setup notebook it does a pip install for aiplatform. Does this step (at the end of the 00 notebook) work for you? Also, can you run this statement after importing aiplatform and let me know the version number? aiplatform.__version__