【问题标题】:AttributeError while loading textHero library加载 textHero 库时出现 AttributeError
【发布时间】:2020-07-08 12:12:23
【问题描述】:

导入 textHero 时出现错误

#import the texthero library
import texthero as hero
import pandas as pd

错误:AttributeError:模块“nltk”没有属性“数据”

我再次安装了 textHero,但错误没有得到解决。

【问题讨论】:

    标签: python text nlp


    【解决方案1】:

    能否请您发布整个错误消息?

    不管怎样,卸载再安装应该可以解决问题NLTK

    pip uninstall nltk
    pip install -U nltk
    

    【讨论】:

      【解决方案2】:

      将 gensim 版本指定为 3.8。为我工作

      【讨论】:

        【解决方案3】:

        导入“texthero”库后。它显示了一条错误消息:

        ModuleNotFoundError:没有名为“gensim.sklearn_api”的模块

        我已尝试安装“gensim.sklearn_api”,但还没有可用的模块。

        另外,为旧版本的类似 python 的 3.6 和 3.7 创建了新的 anaconda 环境,但它显示了相同的错误消息。

        我已经安装了旧版本的 texthero 及其工作

        pip install texthero==1.0.5

        旧版本的 texthero==1.0.5 与 python 版本如 3.6、3.7 和 3.8 非常兼容

        [![在此处输入图片描述][2]][2]

        【讨论】:

          猜你喜欢
          • 2018-12-07
          • 1970-01-01
          • 2018-09-05
          • 1970-01-01
          • 1970-01-01
          • 2015-05-03
          • 2013-02-01
          • 2018-09-05
          • 2021-06-30
          相关资源
          最近更新 更多