我目前正在尝试安装和运行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
>>>
我必须做:
sudo apt-get install python-sklearn
基于这个答案。