HKUDS/DeepTutor · error · HTTPException

GraphRAG is not installed. Run `pip install 'deeptutor[graph

Error message

GraphRAG is not installed. Run `pip install 'deeptutor[graphrag]'` on the server before creating a GraphRAG knowledge base.

What it means

Raised by _assert_provider_ready when provider is graphrag and is_graphrag_available() is False — the optional lightrag/graphrag dependency group is not installed in the server's Python environment. HTTP 400, before any pipeline work.

Source

Thrown at deeptutor/api/routers/knowledge.py:686

        failed_checks = [
            check
            for check in report.get("checks", [])
            if not check.get("optional") and not check.get("ok")
        ]
        if failed_checks:
            details = "; ".join(
                str(check.get("detail") or check.get("label") or "Requirement not met")
                for check in failed_checks
            )
            raise HTTPException(
                status_code=409, detail=f"PageIndex OSS preflight failed: {details}"
            )

    if provider == GRAPHRAG_PROVIDER:
        from deeptutor.services.rag.pipelines.graphrag.config import is_graphrag_available

        if not is_graphrag_available():
            raise HTTPException(
                status_code=400,
                detail=(
                    "GraphRAG is not installed. Run "
                    "`pip install 'deeptutor[graphrag]'` on the server before "
                    "creating a GraphRAG knowledge base."
                ),
            )

        from deeptutor.services.rag.preflight import engine_preflight

        report = engine_preflight(provider)
        failed_checks = [
            check
            for check in report.get("checks", [])
            if not check.get("optional") and not check.get("ok")
        ]
        if failed_checks:
            failure_details = "; ".join(

View on GitHub (pinned to 3e82f13042)

Solutions

  1. Install the extra on the server: pip install 'deeptutor[graphrag]'
  2. Verify in the server venv: python -c "from deeptutor.services.rag.pipelines.graphrag.config import is_graphrag_available; print(is_graphrag_available())"
  3. Restart the server process after installing so imports resolve

Example fix

# before
pip install deeptutor-cli
# after
pip install 'deeptutor[graphrag]'
Defensive patterns

Strategy: validation

Validate before calling

from deeptutor.services.rag.pipelines.graphrag.config import is_graphrag_available
assert is_graphrag_available(), "pip install 'deeptutor[graphrag]'"

Prevention

When it happens

Trigger: Creating/uploading/reindexing a KB with provider=graphrag on a server installed without the `deeptutor[graphrag]` extra (e.g. the slim CLI-only install).

Common situations: pip install deeptutor-cli (dependency-lite) then selecting GraphRAG in the UI; venv rebuilt from a requirements file missing the graphrag group.

Related errors


AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27). Data as JSON: /api/errors/fe9d45a325221e2a. Report an issue: GitHub.