1. Install Python (I am installing Python2.7.8, directory D:\Python27)
2. Install NumPy (optional)
Download here: Http://sourceforge.net/projects/numpy/files/NumPy/1.6.2/numpy-1.6.2-win32-superpack-python2.7.exe
Note the PY version
EXE file after download (the program will automatically search the Python27 directory)
3. Install NLTK (i downloaded nltk-2.0.3)
Download here: HTTP://PYPI.PYTHON.ORG/PYPI/NLTK
Unzip the nltk-3.0.0 to the D:\Python27 directory
Open cmd, go to D:\Python27\nltk-3.0.0 directory (input: CD D:\Python27\nltk-3.0.0)
Input command: Python setup.py install
At this point, Import error:no module named SetuptoolsWindows does not have the Setuptool module installed by default, download the module yourself. exe (http://www.cr173.com/ soft/40214.html#address)
4. Install Pyyaml:
Download here: Http://pyyaml.org/wiki/PyYAML
Note the PY version
EXE file after download (the program will automatically search the Python27 directory)
5. Open idle, enter import NLTK, no error, it means the installation was successful.
Here, the basic Python modules required for NLP are already installed, and then the Nltk_data is installed.
There are several ways to download nltk_data, here I only introduce a
6. Proceed to fifth step, already import nltk, then enter Nltk.download (), so you can open a NLTK Downloader (NLTK Downloader)
7. Note the download Directory below the downloader, I set the C:\nltk_data
8. On computer-Properties-Advanced system Settings-advanced-environment variables-System variables-NEW: Top: Nltk_data, bottom: C:\nltk_data
9. Select the package (corpus, module) you want to download, you can download it all at once (I always appear out of date during the download), or you can download it individually (this is faster and the overall download speed is slow)
10. How to test the package after successful installation? Enter the statement below to do so.
from Nltk.corpus Import Brown Brown. words ()[' The ', ' Fulton ', ' County ', ' Grand ', ' jury ', ' said ', ...]
There is also a Python classic drawing library matplotlib installation: http://blog.csdn.net/huruzun/article/details/39395343
These environments are well-built, the basic Python needs of the toolkit and so on is finished!
Python NLTK Environment Setup