Registry / gcp / google-cloud-aiplatform

google-cloud-aiplatform

JSON →
library1.165.1pypypi✓ verified 24d ago

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.

pip install google-cloud-aiplatform
INSTALL
IMPORT
SIG · GOOGLE-CLOUD-AIPLA
G
google-cloud-aiplatform
gcppythonv1.165.1
Install
17.7s avg
Import
10967ms
Disk
269MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.165.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 15.366s · 259.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 17.7s · import 6.568s · 257MB
269MB installed
● package 269MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

aiplatform
from google.cloud import aiplatform
Ensure to import 'aiplatform' from 'google.cloud' to access Vertex AI functionalities.

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.

import os from google.cloud import aiplatform aiplatform.init( project=os.environ.get('GOOGLE_CLOUD_PROJECT', 'your-project-id'), location='us-central1', staging_bucket='gs://your-staging-bucket' ) # Example: Create a TabularDataset my_dataset = aiplatform.TabularDataset.create( display_name='my-dataset', gcs_source=['gs://path/to/your/data.csv'] ) # Example: Train a Model my_model = aiplatform.Model.upload( display_name='my-model', artifact_uri='gs://path/to/your/model', serving_container_image_uri='gcr.io/cloud-aiplatform/training/tf2-cpu.2-3:latest' ) # Example: Deploy the Model endpoint = my_model.deploy( deployed_model_display_name='my-deployed-model', machine_type='n1-standard-4' )
Debug
Known issues
breakingPython versions <= 3.8 are deprecated and no longer supported in the latest release.
fix
Upgrade your Python environment to version 3.9 or later to ensure compatibility with the latest version of the library.
affects: 1.90.0 and above
gotchaEnsure that the 'google-cloud-aiplatform' package is installed in your environment to avoid ImportError.
fix
Install the package using 'pip install google-cloud-aiplatform' if it's not already installed.
affects: All versions
breakingYour default Google Cloud credentials were not found. The application requires Application Default Credentials (ADC) or explicit credentials to authenticate with Google Cloud services.
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).
affects: All versions
breakingApplication Default Credentials (ADC) were not found, preventing authentication with Google Cloud services.
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
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'google.cloud.aiplatform'
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.
fix
Ensure the library is installed in your environment by running: `pip install google-cloud-aiplatform`.
ImportError: cannot import name 'aiplatform' from 'google.cloud'
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.
fix
Upgrade the library and its dependencies: `pip install --upgrade google-cloud-aiplatform` or `pip install google-cloud-aiplatform --force-reinstall`.
403 PERMISSION_DENIED: Client doesn't have sufficient permission to call the API.
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.
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.
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.
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.
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.
com.google.cloud.ai.platform.common.errors.AiPlatformException: code=RESOURCE_EXHAUSTED, message=The following quota metrics exceed quota limits...
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.
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.
Upgrade
Version history
1.165.1latest on PyPI · released Aug 19, 2026
Audit
Dependencies
google-authrequiredRequired for authentication with Google Cloud services
google-api-corerequiredProvides core functionality for Google API client libraries
google-cloud-corerequiredContains common code for Google Cloud client libraries
Agent activity
37 hits · last 30 days
node
32
OpenAI (training)
1
Resources
google-cloud-aiplatform — pip install google-cloud-aiplatform · libregistry