Installing NLTK

NLTK requires Python versions 2.6-2.7. (A version supporting Python 3 is available at http://nltk.org/nltk3-alpha/).

Mac/Unix

  1. Install Setuptools: http://pypi.python.org/pypi/setuptools
  2. Install Pip: run sudo easy_install pip
  3. Install Numpy (optional): run sudo pip install -U numpy
  4. Install PyYAML and NLTK: run sudo pip install -U pyyaml nltk
  5. Test installation: run python then type import nltk

Windows

These instructions assume that you do not already have Python installed on your machine. If you do, you can skip to the final step and just install NLTK.

32-bit binary installation

  1. Install Python: http://www.python.org/download/releases/2.7.3/ (avoid the 64-bit versions)
  2. Install Numpy (optional): http://sourceforge.net/projects/numpy/files/NumPy/1.6.2/numpy-1.6.2-win32-superpack-python2.7.exe
  3. Install NLTK: http://pypi.python.org/pypi/nltk
  4. Install PyYAML: http://pyyaml.org/wiki/PyYAML
  5. Test installation: Start>Python27, then type import nltk

Source installation (for 32-bit or 64-bit Windows)

  1. Install Python: http://www.python.org/download/releases/2.7.3/
  2. Install Numpy (optional): http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
  3. Install Setuptools: http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe
  4. Install Pip: Start>Run... c:\Python27\Scripts\easy_install pip
  5. Install PyYAML and NLTK: Start>Run... c:\Python27\Scripts\pip install pyyaml nltk
  6. Test installation: Start>All Programs>Python27>IDLE, then type import nltk