首页 > 解决方案 > 加载 textHero 库时出现 AttributeError

问题描述

导入 textHero 时出现错误

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

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

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

标签: pythontextnlp

解决方案


你能把整个错误信息贴出来吗?

无论如何,您应该能够通过卸载并再次安装NLTK来解决问题:

pip uninstall nltk
pip install -U nltk

推荐阅读