Installing NLTK under windows 7 & proxy environment

Another memo for problems when to install NLTK into my Windows 7 64bit environment. As same as previous topic, I just mentioned where I stacked.

1. Installer of some tools are missing?

I got some error message when I tried to install some tools even though I follows "Installing NLTK". The reason was some of installers are not compatible for Windows 7 (64bit) and Python 2.7 environment.

As a workaround, you can find "unofficial" but marvelous installers from this link: http://www.lfd.uci.edu/~gohlke/pythonlibs/ .

If you use the installers of this site, necessary tool installations can be done only with GUI.

Note (on Apr 16 2013): setuptools is no longer updated and cannot be installed to Win 64 and Python 2.7 environment. distribute should be used instead of setuptools. Installer is available in the link above.

2. Download NLTK data over the proxy

After NLTK was successfully installed, I imported NLTK then tried to download sample data.

[source language="python"]

>>> import nltk

>>> nltk.download()

[/source]

However, I got a following error message.

Capture

After some googling, I found this error might be something to do with proxy. Then I tried following way.

[source language="python"]

>>> nltk.set_proxy('http://proxy.example.com:8080')

>>> nltk.download()

[/source]

Capture wo error

After setting the proxy, necessary data to download is displayed.