2

I am currently trying to install and run scikit-learn. Although I was able to get it to install, I get an error when I try and import sklearn.feature_extraction.text. What am I doing wrong?

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
>>> 
Michael0x2a
  • 58,192
  • 30
  • 175
  • 224
Sarath R Nair
  • 485
  • 2
  • 6
  • 18

1 Answers1

2

I had to do:

sudo apt-get install python-sklearn  

based on this answer.

Community
  • 1
  • 1
gsamaras
  • 71,951
  • 46
  • 188
  • 305