which means you did not install nltk. follow these steps to install nltk:
1: follow this link https://pypi.python.org/pypi/setuptools at the end of the page where you will find setuptools-7.0.zip (md5), download it, then unzip it. you can find easy_install.py python script.
2: use the sudo easy_install pip command. By this time, pip will be installed ready to use (make sure you are in the directory where you can find the easy_install script file).
3: use this command sudo pip install -U nltk. successful execution ensures that nltk is now installed.
4: open IDLE, then enter the following:
import nltk
If nltk is installed correctly, you will be returned using the console.
source share