【发布时间】:2013-11-01 06:38:25
【问题描述】:
我目前正在尝试安装和运行scikit-learn。虽然我能够安装它,但当我尝试导入 sklearn.feature_extraction.text 时出现错误。我做错了什么?
from sklearn.feature_extraction.text import CountVectorizer
Traceback (most recent call last):
File "<pyshell#9>", line 1, in <module>
from sklearn.feature_extraction.text import CountVectorizer
ImportError: No module named text
>>>
【问题讨论】:
-
请至少报告您的操作系统名称和版本信息信息。你从哪里得到 scikit-learn 包,你是怎么安装的等等。
-
关闭这将是不公平的,因为 OP 是新的并且只是试图遵循旧教程。
-
你用的是什么版本的 Python?
-
python 2.7.5。我安装了 python 3,它工作得很好。
-
@SarathRNair 有理由不接受我的回答吗?
标签: python scikit-learn