ArticleDirectory
- Source installation (for 32-bit or 64-bit Windows)
To learn how to install NLP module nltk of Python
The Installation Guide and installation file are both at http://nltk.org/install.html. The process is as follows:
Source installation (for 32-bit or 64-bit Windows)
-
- Install Python: http://www.python.org/download/releases/2.7.3/
-
- Install numpy (optional): http://www.lfd.uci.edu /~ Gohlke/pythonlibs/# numpy
-
- Install setuptools: http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe
-
- Install PIP:Start> run... C: \ python27 \ scripts \ easy_install Pip
- Install pyyaml and nltk:Start> run... C: \ python27 \ scripts \ Pip Install Pyyaml Nltk
-
- Test installation:Start> All Programs> python27> idle, Then typeImport Nltk
However, the problem may always occur after one step.
There is no problem with installation 1 and 2. When installing step 3, the system always prompts that the required Python version cannot be found.
Engaged in a long time, found the answer on the internet, here not to elaborate, please see http://www.cnblogs.com/min0208/archive/2012/05/24/2515584.html
I installed ymin to complete step 1, but in Step 4, I was prompted that I had insufficient file permissions. I installed python on the C drive and managed the permissions of win7, I had to delete Python and try again. I installed python on the D Drive. However, after three steps, setuptools only found the directory I installed earlier, that is, the C drive directory, I ran it again using the ymin method...
Later, I found the method by myself: Expand the registry, and open heky_current_user-> Software-> Python-> pythoncore-> 2.7 (Note: Which version is installed here, I installed 2.7). check whether there is any pythonpath item. If not, create a pythonpath item and create a new binary data in the pythonpath item, set the value to your python installation directory (for example, My: D: \ Program Files (x86) \ python2.7; C: \ Program Files (x86) \ python2.7 \ Lib \; D: \ Program Files (x86) \ python2.7 \ DLLs \) after completion, re-Execute step 3rd to install successfully.