RyanCodrai/turbovec · error · ImportError

llama-index-core is required to use turbovec.llama_index. In

Error message

llama-index-core is required to use turbovec.llama_index. Install with: pip install turbovec[llama-index]

What it means

Module-level ImportError raised when turbovec.llama_index is imported without llama-index-core installed. The try/except around the llama_index.core imports converts the raw ModuleNotFoundError into a named error with the correct extra-install command, failing at import time.

Source

Thrown at turbovec-python/python/turbovec/llama_index.py:63

        RelatedNodeInfo,
        TextNode,
    )
    from llama_index.core.vector_stores.types import (
        BasePydanticVectorStore,
        FilterCondition,
        FilterOperator,
        MetadataFilter,
        MetadataFilters,
        VectorStoreQuery,
        VectorStoreQueryMode,
        VectorStoreQueryResult,
    )
    from llama_index.core.vector_stores.utils import (
        metadata_dict_to_node,
        node_to_metadata_dict,
    )
except ImportError as exc:
    raise ImportError(
        "llama-index-core is required to use turbovec.llama_index. "
        "Install with: pip install turbovec[llama-index]"
    ) from exc


# Persistence layout: a single user-facing ``persist_path`` (the file the
# framework asks us to write) is split into two files by extension —
# ``{base}.tvim`` for the binary IdMapIndex and ``{base}.nodes.json`` for
# the node side-car. Both live next to each other so the layout fits the
# directory-of-namespaced-files pattern used by StorageContext.
_INDEX_EXT = ".tvim"
_STORE_EXT = ".nodes.json"
# Filename template used by SimpleVectorStore for namespace lookup —
# mirrored here so `from_persist_dir` works the same way.
_NAMESPACE_SEP = "__"
_DEFAULT_PERSIST_FNAME = "vector_store.json"
_DEFAULT_VECTOR_STORE = "default"
# Bump when the nodes.json shape changes; loader accepts the current

View on GitHub (pinned to ccab9f325e)

Solutions

  1. Install the extra: pip install turbovec[llama-index].
  2. Or install llama-index-core directly into the environment.
  3. Avoid importing turbovec.llama_index in environments that do not need LlamaIndex integration.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at turbovec-python/python/turbovec/llama_index.py:63 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of RyanCodrai/turbovec@ccab9f325e (2026-09-06). Data as JSON: /api/errors/7e29c62dee86f72e. Report an issue: GitHub.