ModuleNotFoundError: 没有名为“indexer”的模块

问题描述

ModuleNotFoundError 回溯(最近一次调用最后一次) 在 () ----> 1 从拼写检查器导入 SpellChecker 2 3 拼写 = SpellChecker() 4 定义正确的拼写(文本): 5 Corrected_text = []

1 帧 /usr/local/lib/python3.7/dist-packages/spellchecker/core.py () 24 导入 urllib 25 ---> 26 从索引器导入 DictionaryIndex 27 从 langdetect 导入 _detect_lang 28

ModuleNotFoundError: 没有名为“indexer”的模块


注意:如果您的导入由于缺少包而失败,您可以 使用 !pip 或 !apt 手动安装依赖项。

要查看安装一些常见依赖项的示例,请单击 下方的“打开示例”按钮。enter code here

解决方法

您可能已经使用它来安装 pip install spellchecker,使用 pip install pyspellchecker 安装。