When I run this command in a file or in a shell
import nltk
I get the following error :
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/nltk/__init__.py", line 83, in <module>
from collocations import *
File "/usr/lib/python2.7/dist-packages/nltk/collocations.py", line 37, in <module>
from nltk.probability import FreqDist
File "/usr/lib/python2.7/dist-packages/nltk/probability.py", line 45, in <module>
import random
File "random.py", line 2, in <module>
T = int(raw_input())
ValueError: invalid literal for int() with base 10: ''
Not able to comprehend what is going wrong.
random.py? Change its name to something else and then run. It is overwriting the random method used by nltk.