mem0ai/mem0 · error · ImportError
Turbopuffer requires extra dependencies. Install with `pip i
Error message
Turbopuffer requires extra dependencies. Install with `pip install turbopuffer`
What it means
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.
Source
Thrown at mem0/vector_stores/turbopuffer.py:8
import logging
import os
from typing import Any, Dict, List, Optional, Union
try:
from turbopuffer import Turbopuffer as TurbopufferClient
except ImportError:
raise ImportError(
"Turbopuffer requires extra dependencies. Install with `pip install turbopuffer`"
) from None
from pydantic import BaseModel
from mem0.vector_stores.base import VectorStoreBase
logger = logging.getLogger(__name__)
class OutputData(BaseModel):
id: Optional[str]
score: Optional[float]
payload: Optional[Dict]
class TurbopufferDB(VectorStoreBase):
def __init__(View on GitHub (pinned to 001c235229)
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`).
Example fix
# before from mem0.vector_stores.turbopuffer import Turbopuffer # ImportError # after # pip install turbopuffer from mem0.vector_stores.turbopuffer import Turbopuffer # ok
Defensive patterns
Strategy: try-catch
Validate before calling
import importlib.util
if importlib.util.find_spec("turbopuffer") is None:
raise SystemExit("Missing dependency: turbopuffer. Run: pip install turbopuffer") Try / catch
try:
from mem0.vector_stores.turbopuffer import Turbopuffer
except ImportError as e:
raise RuntimeError(f"Turbopuffer client missing: {e}") from e Prevention
- 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.
When it happens
Trigger: `from mem0.vector_stores.turbopuffer import Turbopuffer` or `"vector_store": {"provider": "turbopuffer"}` in any environment where `import turbopuffer` raises ImportError.
Common situations: 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.
Related errors
- Pinecone requires extra dependencies. Install with `pip inst
- The 'boto3' library is required. Please install it using 'pi
- The 'vecs' library is required. Please install it using 'pip
- The 'upstash_vector' library is required. Please install it
- The 'upstash_vector' library is required. Please install it
AI-assisted analysis of mem0ai/mem0@001c235229 (2026-08-15).
Data as JSON: /api/errors/e99ffd3568c9f168.
Report an issue: GitHub.