{"record":{"id":"fd0b519c70bb23ef","repo":"mem0ai/mem0","slug":"the-vecs-library-is-required-please-install-it","errorCode":null,"errorMessage":"The 'vecs' library is required. Please install it using 'pip install vecs'.","messagePattern":"The 'vecs' library is required\\. Please install it using 'pip install vecs'\\.","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"mem0/vector_stores/supabase.py","lineNumber":10,"sourceCode":"import logging\nimport uuid\nfrom typing import List, Optional\n\nfrom pydantic import BaseModel\n\ntry:\n    import vecs\nexcept ImportError:\n    raise ImportError(\"The 'vecs' library is required. Please install it using 'pip install vecs'.\")\n\nfrom mem0.configs.vector_stores.supabase import IndexMeasure, IndexMethod\nfrom mem0.vector_stores.base import VectorStoreBase\n\nlogger = logging.getLogger(__name__)\n\nVECS_MAX_QUERY_LIMIT = 1000\n\n\nclass OutputData(BaseModel):\n    id: Optional[str]\n    score: Optional[float]\n    payload: Optional[dict]\n\n\nclass Supabase(VectorStoreBase):\n    def __init__(\n        self,","sourceCodeStart":1,"sourceCodeEnd":28,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0/vector_stores/supabase.py#L1-L28","documentation":"Raised at import time when the `vecs` package (Supabase's pgvector client library) is not installed. mem0's Supabase vector store delegates all collection and query work to `vecs`, which is optional, so the module import fails fast with an install instruction.","triggerScenarios":"`from mem0.vector_stores.supabase import Supabase` or Memory config with `\"provider\": \"supabase\"` where `import vecs` raises ImportError.","commonSituations":"Confusing the `supabase` JS/PY client (which is a different package) with `vecs`; base mem0ai installs; CI environments without the Supabase extra; new team members following the Supabase dashboard docs instead of mem0's setup docs.","solutions":["Run `pip install vecs` in the environment running mem0.","Confirm the right package: it is `vecs` on PyPI (Supabase Vector), not `supabase`.","Ensure a Postgres/pgvector database URL is also configured, since vecs will need it at runtime (connection string with the pgvector extension available)."],"exampleFix":"# before\nmemory = Memory.from_config({\"vector_store\": {\"provider\": \"supabase\", ...}})  # ImportError\n\n# after\n# pip install vecs\nmemory = Memory.from_config({\"vector_store\": {\"provider\": \"supabase\", \"config\": {\"collection_name\": \"mem\", \"connection_string\": DB_URL}}})","handlingStrategy":"try-catch","validationCode":"import importlib.util\n\nif importlib.util.find_spec(\"vecs\") is None:\n    raise SystemExit(\"Missing dependency: vecs (not 'supabase'). Run: pip install vecs\")","typeGuard":null,"tryCatchPattern":"try:\n    from mem0.vector_stores.supabase import Supabase\nexcept ImportError as e:\n    raise RuntimeError(f\"Supabase vector client missing: {e}. Install with pip install vecs.\") from e","preventionTips":["Remember the package is `vecs`, not `supabase` — document this in your setup README.","Pin vecs alongside mem0ai in requirements to keep pgvector protocol compatibility.","Ensure the Postgres connection string targets a database with the pgvector extension available."],"tags":["dependencies","supabase","vecs","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"}