Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running TextBlob in Python3

I installed textblob using pip as given here.

Now, when I try to import this in python3.4 in terminal then it says

ImportError: No module named 'textblob'

Whereas, in python2.7 it imports happily. I have tried reinstalling it. I have even reinstalled pip. What is the problem here?

like image 701
TrigonaMinima Avatar asked Feb 13 '15 22:02

TrigonaMinima


People also ask

Is TextBlob good for sentiment analysis?

Here, TextBlob works amazingly as a sentiment analyzer. And I was successful in delivering my project next Monday and got appreciation as well from my colleagues.

Is TextBlob part of NLTK?

TextBlob is built upon NLTK and provides an easy to use interface to the NLTK library. We will see how TextBlob can be used to perform a variety of NLP tasks ranging from parts-of-speech tagging to sentiment analysis, and language translation to text classification.


1 Answers

Elementary OS being an Ubuntu derivative,

$ sudo apt-get install python3-pip
...
$ pip3 install textblob

should do the trick. It is possible that you have to apply some minor variation to the above due to eventual differences between Elementary and Ubuntu.

Remember that Python 2.7 and Python 3.x are two independent systems, what you install in 2.7 is definitely NOT automatically available for 3.x and the converse is equally true.

like image 55
gboffi Avatar answered Sep 18 '22 07:09

gboffi