NLTK installation, NLTK Installation
If you are in version 2.7 and the computer is a 64-bit machine. We recommend that you follow the steps below to install
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: https://pypi.python.org/pypi/pip#downloads
Install PyYAML and NLTK: http://pyyaml.org/wiki/PyYAML
If
Python version 2.7 required, which was not found in the registry
Create a new register. py file and paste the code into it,
import sys from _winreg import * # tweak as necessaryversion = sys.version[:3]installpath = sys.prefix regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version)installkey = "InstallPath"pythonkey = "PythonPath"pythonpath = "%s;%s\\Lib\\;%s\\DLLs\\" % ( installpath, installpath, installpath) def RegisterPy(): try: reg = OpenKey(HKEY_CURRENT_USER, regpath) except EnvironmentError as e: try: reg = CreateKey(HKEY_CURRENT_USER, regpath) SetValue(reg, installkey, REG_SZ, installpath) SetValue(reg, pythonkey, REG_SZ, pythonpath) CloseKey(reg) except: print "*** Unable to register!" return print "--- Python", version, "is now registered!" return if (QueryValue(reg, installkey) == installpath and QueryValue(reg, pythonkey) == pythonpath): CloseKey(reg) print "=== Python", version, "is already registered!" return CloseKey(reg) print "*** Unable to register!" print "*** You probably have another Python installation!" if __name__ == "__main__": RegisterPy()
After running
Show "python 2.7 is already registered"
When you install setuptools, You can automatically identify python2.7.
Windows 7 is 64. When installing python (32-bit), if you select only the current user, the above problems will not occur. If you select all users, use the above method to solve the problem.