{"record":{"id":"e99ffd3568c9f168","repo":"mem0ai/mem0","slug":"turbopuffer-requires-extra-dependencies-install-w","errorCode":null,"errorMessage":"Turbopuffer requires extra dependencies. Install with `pip install turbopuffer`","messagePattern":"Turbopuffer requires extra dependencies\\. Install with `pip install turbopuffer`","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"mem0/vector_stores/turbopuffer.py","lineNumber":8,"sourceCode":"import logging\nimport os\nfrom typing import Any, Dict, List, Optional, Union\n\ntry:\n    from turbopuffer import Turbopuffer as TurbopufferClient\nexcept ImportError:\n    raise ImportError(\n        \"Turbopuffer requires extra dependencies. Install with `pip install turbopuffer`\"\n    ) from None\n\nfrom pydantic import BaseModel\n\nfrom mem0.vector_stores.base import VectorStoreBase\n\nlogger = logging.getLogger(__name__)\n\n\nclass OutputData(BaseModel):\n    id: Optional[str]\n    score: Optional[float]\n    payload: Optional[Dict]\n\n\nclass TurbopufferDB(VectorStoreBase):\n    def __init__(","sourceCodeStart":1,"sourceCodeEnd":26,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0/vector_stores/turbopuffer.py#L1-L26","documentation":"Raised at import time when the `turbopuffer` Python client is not installed. mem0 treats it as an optional dependency, so importing the Turbopuffer vector store module fails immediately with an install hint, mirroring the pattern used by the other provider modules.","triggerScenarios":"`from mem0.vector_stores.turbopuffer import Turbopuffer` or `\"vector_store\": {\"provider\": \"turbopuffer\"}` in any environment where `import turbopuffer` raises ImportError.","commonSituations":"Turbopuffer being a newer/niche provider not included in base installs; evaluating Turbopuffer after seeing it in the provider list; CI or Docker images that only install extras for the providers currently in use.","solutions":["Install it: `pip install turbopuffer`.","Pin the version in requirements to keep API compatibility with mem0's usage of the client.","If the import still fails, check you are on the intended interpreter (`which python` / `pip -V`)."],"exampleFix":"# before\nfrom mem0.vector_stores.turbopuffer import Turbopuffer  # ImportError\n\n# after\n# pip install turbopuffer\nfrom mem0.vector_stores.turbopuffer import Turbopuffer  # ok","handlingStrategy":"try-catch","validationCode":"import importlib.util\n\nif importlib.util.find_spec(\"turbopuffer\") is None:\n    raise SystemExit(\"Missing dependency: turbopuffer. Run: pip install turbopuffer\")","typeGuard":null,"tryCatchPattern":"try:\n    from mem0.vector_stores.turbopuffer import Turbopuffer\nexcept ImportError as e:\n    raise RuntimeError(f\"Turbopuffer client missing: {e}\") from e","preventionTips":["Install provider SDKs at image build time, not lazily at runtime.","Pin the turbopuffer client version to avoid breaking changes in its API surface.","Run a dependency smoke test (import all configured providers) in CI."],"tags":["dependencies","turbopuffer","import-error","installation","vector-store"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}