{"record":{"id":"650932d3849e4f79","repo":"chroma-core/chroma","slug":"the-vertexai-python-package-is-not-installed-plea","errorCode":null,"errorMessage":"The vertexai python package is not installed. Please install it with `pip install google-cloud-aiplatform`","messagePattern":"The vertexai python package is not installed\\. Please install it with `pip install google-cloud-aiplatform`","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"chromadb/utils/embedding_functions/google_embedding_function.py","lineNumber":519,"sourceCode":"    ):\n        \"\"\"\n        Initialize the GoogleVertexEmbeddingFunction.\n\n        Args:\n            api_key_env_var (str, optional): Environment variable name that contains your API key for the Google Vertex AI API.\n                Defaults to \"CHROMA_GOOGLE_VERTEX_API_KEY\".\n            model_name (str, optional): The name of the model to use for text embeddings.\n                Defaults to \"textembedding-gecko\".\n            project_id (str, optional): The Google Cloud project ID.\n                Defaults to \"cloud-large-language-models\".\n            region (str, optional): The Google Cloud region.\n                Defaults to \"us-central1\".\n        \"\"\"\n        try:\n            import vertexai\n            from vertexai.language_models import TextEmbeddingModel\n        except ImportError:\n            raise ValueError(\n                \"The vertexai python package is not installed. Please install it with `pip install google-cloud-aiplatform`\"\n            )\n\n        if api_key is not None:\n            warnings.warn(\n                \"Direct api_key configuration will not be persisted. \"\n                \"Please use environment variables via api_key_env_var for persistent storage.\",\n                DeprecationWarning,\n            )\n        if os.getenv(\"GOOGLE_API_KEY\") is not None:\n            self.api_key_env_var = \"GOOGLE_API_KEY\"\n        else:\n            self.api_key_env_var = api_key_env_var\n\n        self.api_key = api_key or os.getenv(self.api_key_env_var)\n        if not self.api_key:\n            raise ValueError(\n                f\"The {self.api_key_env_var} environment variable is not set.\"","sourceCodeStart":501,"sourceCodeEnd":537,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/utils/embedding_functions/google_embedding_function.py#L501-L537","documentation":"Error \"The vertexai python package is not installed. Please install it with `pip install google-cloud-aiplatform`\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/utils/embedding_functions/google_embedding_function.py:519 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}