1. Install Python (I am installing Python2.7.8, folder 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 number
Run exe file after download (the program will actively search the Python27 folder)
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 folder
Open cmd, go to D:\Python27\nltk-3.0.0 folder (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 number
Run exe file after download (the program will actively search the Python27 folder)
5. Open idle, enter import NLTK, no error. The instructions are installed successfully.
to here. The basic Python modules required for NLP are already installed, and then you have to install Nltk_data.
There are several ways to download nltk_data. Here I just introduce a
6. Proceed to fifth step, already import nltk, then enter Nltk.download () so that you can open a NLTK Downloader (NLTK Downloader)
7. Note the download Directory below the downloader. I'm setting up a 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. Be able to download once (I always appear out of date during the download). can also be downloaded individually (this is faster, the overall download speed is very slow)
10. How do I test after installing a successful package? Enter the statement below to be able to.
from Nltk.corpus Import Brown Brown. words ()[' The ', ' Fulton ', ' County ', ' Grand ', ' jury ', ' said ', ...]
Installation of another Python classic drawing library matplotlib: http://blog.csdn.net/huruzun/article/details/39395343
These environments are set up, the basic Python needs of the most commonly used toolkit and so on is finished!
Python NLTK Environment Setup