{"record":{"id":"fe9d45a325221e2a","repo":"HKUDS/DeepTutor","slug":"graphrag-is-not-installed-run-pip-install-deept","errorCode":null,"errorMessage":"GraphRAG is not installed. Run `pip install 'deeptutor[graphrag]'` on the server before creating a GraphRAG knowledge base.","messagePattern":"GraphRAG is not installed\\. Run `pip install 'deeptutor\\[graphrag\\]'` on the server before creating a GraphRAG knowledge base\\.","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"deeptutor/api/routers/knowledge.py","lineNumber":686,"sourceCode":"        failed_checks = [\n            check\n            for check in report.get(\"checks\", [])\n            if not check.get(\"optional\") and not check.get(\"ok\")\n        ]\n        if failed_checks:\n            details = \"; \".join(\n                str(check.get(\"detail\") or check.get(\"label\") or \"Requirement not met\")\n                for check in failed_checks\n            )\n            raise HTTPException(\n                status_code=409, detail=f\"PageIndex OSS preflight failed: {details}\"\n            )\n\n    if provider == GRAPHRAG_PROVIDER:\n        from deeptutor.services.rag.pipelines.graphrag.config import is_graphrag_available\n\n        if not is_graphrag_available():\n            raise HTTPException(\n                status_code=400,\n                detail=(\n                    \"GraphRAG is not installed. Run \"\n                    \"`pip install 'deeptutor[graphrag]'` on the server before \"\n                    \"creating a GraphRAG knowledge base.\"\n                ),\n            )\n\n        from deeptutor.services.rag.preflight import engine_preflight\n\n        report = engine_preflight(provider)\n        failed_checks = [\n            check\n            for check in report.get(\"checks\", [])\n            if not check.get(\"optional\") and not check.get(\"ok\")\n        ]\n        if failed_checks:\n            failure_details = \"; \".join(","sourceCodeStart":668,"sourceCodeEnd":704,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/api/routers/knowledge.py#L668-L704","documentation":"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.","triggerScenarios":"Creating/uploading/reindexing a KB with provider=graphrag on a server installed without the `deeptutor[graphrag]` extra (e.g. the slim CLI-only install).","commonSituations":"pip install deeptutor-cli (dependency-lite) then selecting GraphRAG in the UI; venv rebuilt from a requirements file missing the graphrag group.","solutions":["Install the extra on the server: pip install 'deeptutor[graphrag]'","Verify in the server venv: python -c \"from deeptutor.services.rag.pipelines.graphrag.config import is_graphrag_available; print(is_graphrag_available())\"","Restart the server process after installing so imports resolve"],"exampleFix":"# before\npip install deeptutor-cli\n# after\npip install 'deeptutor[graphrag]'","handlingStrategy":"validation","validationCode":"from deeptutor.services.rag.pipelines.graphrag.config import is_graphrag_available\nassert is_graphrag_available(), \"pip install 'deeptutor[graphrag]'\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install the extras matching the providers you plan to use","Check provider availability programmatically before exposing options in the UI","Pin extras in deployment requirements files"],"tags":["graphrag","rag","missing-dependency","install","http-400"],"backgroundTag":"missing-optional-dependency","analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}