{"record":{"id":"94fa09e933bdb087","repo":"run-llama/llama_index","slug":"spacy-is-not-installed-please-install-it-with-pi","errorCode":null,"errorMessage":"Spacy is not installed, please install it with `pip install spacy`.","messagePattern":"Spacy is not installed, please install it with `pip install spacy`\\.","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/node_parser/text/semantic_double_merging_splitter.py","lineNumber":54,"sourceCode":"            raise ValueError(\n                f\"{language} language is not supported yet! Available languages: {LANGUAGES}\"\n            )\n\n        if spacy_model not in LANGUAGE_MODELS[language] and model_validation:\n            raise ValueError(\n                f\"{spacy_model} model is not matching your language: {language}\"\n            )\n\n        self.language = language\n        self.spacy_model = spacy_model\n        self.nlp = None\n        self.stopwords: List[str] = []\n\n    def load_model(self) -> None:\n        try:\n            import spacy\n        except ImportError:\n            raise ImportError(\n                \"Spacy is not installed, please install it with `pip install spacy`.\"\n            )\n        self.nlp = spacy.load(self.spacy_model)  # type: ignore\n        self.stopwords = set(globals_helper.stopwords)  # type: ignore\n\n\nclass SemanticDoubleMergingSplitterNodeParser(NodeParser):\n    \"\"\"\n    Semantic double merging text splitter.\n\n    Splits a document into Nodes, with each node being a group of semantically related sentences.\n    Supports either Spacy (language-specific) or an embedding model (any language, e.g. Hugging Face).\n\n    Args:\n        language_config (LanguageConfig): language and Spacy model when using Spacy backend (ignored if embed_model is set)\n        embed_model (Optional[BaseEmbedding]): when set, use this for similarity instead of Spacy (multilingual)\n        initial_threshold (float): sets threshold for initializing new chunk\n        appending_threshold (float): sets threshold for appending new sentences to chunk","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/node_parser/text/semantic_double_merging_splitter.py#L36-L72","documentation":"Error \"Spacy is not installed, please install it with `pip install spacy`.\" thrown in run-llama/llama_index.","triggerScenarios":"Thrown at llama-index-core/llama_index/core/node_parser/text/semantic_double_merging_splitter.py:54 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install spacy: `pip install spacy`.","Also download the required model, e.g. `python -m spacy download en_core_web_md`."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}