Installing NLTK

To install NLTK and numpy, find a section below that is most relevant to your operating system and Python installation, and follow the instructions. You can also reference the official install instructions.

Once you've installed NLTK, then download the data. Also download the subjectivity corpus from Movie Review Data. Installation of the subjectivity corpus will be covered during class.

Finally, download a copy of nltk-trainer. A zipfile of the latest code is available here. Installation and usage of various nltk-trainer scripts will be covered during class.

If you have any issues with installation, send an email to


If you have pip installed, then you can do

    $ sudo pip install nltk numpy

virtualenv & pip

To use a virtualenv, then do

    $ virtualenv nltkenv
    $ nltkenv/bin/pip install nltk numpy


For an Ubuntu or Debian based Linux, you can do

    $ sudo apt-get install python-nltk python-numpy

Mac, Unix, Linux

For Mac OS X and all other unix/linux based operating systems, follow these install instructions. For Macs, if these instructions don't work, see the older installation instructions.


Method 1: install Python XY then download and install nltk-2.0.1rc4.win32.exe

Method 2: follow these install instructions

community/tutorials/199 Recently modified by japerk: March 6, 2012, 12:52 p.m. (History) Edit