chroma-core/chroma · error · ValueError
The vertexai python package is not installed. Please…
Error message
The vertexai python package is not installed. Please install it with `pip install google-cloud-aiplatform`
What it means
Dependency guard in GoogleVertexEmbeddingFunction.__init__: the google-cloud-aiplatform (vertexai) package is missing from the environment; the function cannot work without it and instructs the user to pip install it.
Solutions
- Install the dependency: pip install google-cloud-aiplatform
- Install Chroma's google extras if available, e.g. pip install chromadb[google]
- Verify installation in the active environment/venv
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at chromadb/utils/embedding_functions/google_embedding_function.py:519 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/650932d3849e4f79.
Report an issue: GitHub.
Appendix: source
Thrown at chromadb/utils/embedding_functions/google_embedding_function.py:519
):
"""
Initialize the GoogleVertexEmbeddingFunction.
Args:
api_key_env_var (str, optional): Environment variable name that contains your API key for the Google Vertex AI API.
Defaults to "CHROMA_GOOGLE_VERTEX_API_KEY".
model_name (str, optional): The name of the model to use for text embeddings.
Defaults to "textembedding-gecko".
project_id (str, optional): The Google Cloud project ID.
Defaults to "cloud-large-language-models".
region (str, optional): The Google Cloud region.
Defaults to "us-central1".
"""
try:
import vertexai
from vertexai.language_models import TextEmbeddingModel
except ImportError:
raise ValueError(
"The vertexai python package is not installed. Please install it with `pip install google-cloud-aiplatform`"
)
if api_key is not None:
warnings.warn(
"Direct api_key configuration will not be persisted. "
"Please use environment variables via api_key_env_var for persistent storage.",
DeprecationWarning,
)
if os.getenv("GOOGLE_API_KEY") is not None:
self.api_key_env_var = "GOOGLE_API_KEY"
else:
self.api_key_env_var = api_key_env_var
self.api_key = api_key or os.getenv(self.api_key_env_var)
if not self.api_key:
raise ValueError(
f"The {self.api_key_env_var} environment variable is not set."View on GitHub (pinned to aecdd12c8a)