我安装包是为了清理数据
!pip install tweet-preprocessor
from preprocessor import TwitterPreprocessor
我同时使用Jupyter和Colab,在Jupyter中使用没有问题。但是,在colab收到这个问题:
导入错误:无法从“预处理器”导入名称“TwitterPreprocessor”(/usr/local/lib/python3.7/dist-packages/preprocessor/init.py)
请帮我纠正这个问题
谢谢你
Tags:
库tweet-preprocessor根本没有您试图导入的
TwitterPreprocessor
。看看眼前的GitHub repo-noTwitterPreprocessor
建议通过以下方式导入:} 可以导入哪些名称
import preprocessor as p
(或者从GitHub repo导入上述名称之一)。您可以查看^{相关问题 更多 >
编程相关推荐