{"id":400,"library":"google-cloud-aiplatform","title":"Google Cloud AI Platform Python Client Library","description":"The Google Cloud AI Platform Python Client Library provides a set of tools for interacting with Vertex AI services, enabling users to build, deploy, and manage machine learning models on Google Cloud. As of version 1.143.0, released on March 25, 2026, the library continues to evolve with regular updates to enhance functionality and performance.","status":"active","version":"1.143.0","language":"python","source_language":"en","source_url":"https://github.com/googleapis/python-aiplatform","tags":["Google Cloud","AI Platform","Machine Learning","Python Client Library"],"install":[{"cmd":"pip install google-cloud-aiplatform","lang":"bash","label":"Install the latest version"}],"dependencies":[{"reason":"Required for authentication with Google Cloud services","package":"google-auth","optional":false},{"reason":"Provides core functionality for Google API client libraries","package":"google-api-core","optional":false},{"reason":"Contains common code for Google Cloud client libraries","package":"google-cloud-core","optional":false}],"imports":[{"note":"Ensure to import 'aiplatform' from 'google.cloud' to access Vertex AI functionalities.","symbol":"aiplatform","correct":"from google.cloud import aiplatform"}],"quickstart":{"code":"import os\nfrom google.cloud import aiplatform\n\naiplatform.init(\n    project=os.environ.get('GOOGLE_CLOUD_PROJECT', 'your-project-id'),\n    location='us-central1',\n    staging_bucket='gs://your-staging-bucket'\n)\n\n# Example: Create a TabularDataset\nmy_dataset = aiplatform.TabularDataset.create(\n    display_name='my-dataset',\n    gcs_source=['gs://path/to/your/data.csv']\n)\n\n# Example: Train a Model\nmy_model = aiplatform.Model.upload(\n    display_name='my-model',\n    artifact_uri='gs://path/to/your/model',\n    serving_container_image_uri='gcr.io/cloud-aiplatform/training/tf2-cpu.2-3:latest'\n)\n\n# Example: Deploy the Model\nendpoint = my_model.deploy(\n    deployed_model_display_name='my-deployed-model',\n    machine_type='n1-standard-4'\n)","lang":"python","description":"This quickstart guide demonstrates how to initialize the AI Platform SDK, create a TabularDataset, upload a model, and deploy it to an endpoint using environment variables for authentication."},"warnings":[{"fix":"Upgrade your Python environment to version 3.9 or later to ensure compatibility with the latest version of the library.","message":"Python versions <= 3.8 are deprecated and no longer supported in the latest release.","severity":"breaking","affected_versions":"1.90.0 and above"},{"fix":"Install the package using 'pip install google-cloud-aiplatform' if it's not already installed.","message":"Ensure that the 'google-cloud-aiplatform' package is installed in your environment to avoid ImportError.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Set up Application Default Credentials by running `gcloud auth application-default login` or ensure appropriate service account credentials are provided to your environment or code (e.g., via `GOOGLE_APPLICATION_CREDENTIALS` environment variable).","message":"Your default Google Cloud credentials were not found. The application requires Application Default Credentials (ADC) or explicit credentials to authenticate with Google Cloud services.","severity":"breaking","affected_versions":"All versions"},{"fix":"Set up Application Default Credentials (ADC) in your environment. Refer to the official Google Cloud documentation for instructions: https://cloud.google.com/docs/authentication/external/set-up-adc","message":"Application Default Credentials (ADC) were not found, preventing authentication with Google Cloud services.","severity":"breaking","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-05-12T13:35:16.208Z","next_check":"2026-06-26T00:00:00.000Z","problems":[{"fix":"Ensure the library is installed in your environment by running: `pip install google-cloud-aiplatform`.","cause":"The `google-cloud-aiplatform` library is not installed in the active Python environment, or the environment where it's installed is not the one being used.","error":"ModuleNotFoundError: No module named 'google.cloud.aiplatform'"},{"fix":"Upgrade the library and its dependencies: `pip install --upgrade google-cloud-aiplatform` or `pip install google-cloud-aiplatform --force-reinstall`.","cause":"This error often occurs when the `google-cloud-aiplatform` package is missing, improperly installed, or there's a version conflict with other `google-cloud` packages in the Python environment.","error":"ImportError: cannot import name 'aiplatform' from 'google.cloud'"},{"fix":"Grant the required IAM roles to your service account or user, typically 'Vertex AI User' at minimum, and ensure the 'Vertex AI API' is enabled in your Google Cloud Project's API Library. Authenticate correctly, often via `gcloud auth application-default login` for local development.","cause":"The authenticated service account or user lacks the necessary IAM roles (e.g., 'Vertex AI User') to access the Vertex AI API or specific resources within your Google Cloud project, or the Vertex AI API is not enabled for the project.","error":"403 PERMISSION_DENIED: Client doesn't have sufficient permission to call the API."},{"fix":"Verify the model name, project ID, and region in your code. Ensure the Vertex AI API is enabled and that your service account has the 'Vertex AI User' role. Some generative models may require specific regional availability or additional allowlisting by Google Cloud Support.","cause":"The requested model name, project ID, or region is incorrect, the model is not available in that region, or the project/account lacks specific access or has not enabled necessary APIs for publisher models.","error":"404 Not Found: Publisher Model projects/[PROJECT_ID]/locations/[REGION]/publishers/google/models/[MODEL_NAME] was not found or your project does not have access to it."},{"fix":"Review your project's quotas for Vertex AI in the Google Cloud Console's 'Quotas' page and request an increase for the relevant metrics if needed. Implement exponential backoff and retry logic in your application to handle temporary quota spikes.","cause":"Your Google Cloud project has reached its quota limit for a specific Vertex AI resource, such as custom model training CPUs, GPUs, or API requests.","error":"com.google.cloud.ai.platform.common.errors.AiPlatformException: code=RESOURCE_EXHAUSTED, message=The following quota metrics exceed quota limits..."}],"ecosystem":"pypi","meta_description":null,"install_score":80,"install_tag":"verified","quickstart_score":0,"quickstart_tag":"stale","pypi_latest":null,"install_checks":{"last_tested":"2026-05-12","tag":"verified","tag_description":"installs cleanly on critical runtimes, fast import, recently tested","results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":16.48,"mem_mb":226.1,"disk_size":"240.5M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":5.05,"mem_mb":138.8,"disk_size":"237M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":17.91,"mem_mb":238.1,"disk_size":"270.8M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":8.68,"mem_mb":159.6,"disk_size":"268M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":16.73,"mem_mb":234.3,"disk_size":"258.6M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":9.57,"mem_mb":156.7,"disk_size":"256M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":15.74,"mem_mb":234.6,"disk_size":"255.8M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":9.42,"mem_mb":155.5,"disk_size":"253M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":15.86,"mem_mb":228.9,"disk_size":"236.9M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":5.29,"mem_mb":141.9,"disk_size":"234M"}]},"quickstart_checks":{"last_tested":"2026-04-23","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]}}