2
votes

I have installed python 2.7.3 on a Windows 8, 64 bit machine, sublime text and nltk 3.0.1 with the following steps:

  • Install Setuptools: http://pypi.python.org/pypi/setuptools and run ez_setup.py from the directory stored in python27 (from CMD prompt)

  • Install NLTK: http://pypi.python.org/pypi/nltk In nltk directory run setup.py to install nltk (from CMD prompt)

  • Change the environmental variables to %PYTHONPATH%;C:\Python27;C:\Python27\DLLs;C:\Python27\Lib;C:\Python27\Lib\lib2to3;C:\Python27\Scripts with PYTHONPATH with C:\Python27

Test installation: Start>Python34, then type import nltk in sublime type

import nltk
nltk.set_proxy('xxx.xx.xx.xx:yy',('username','pwd'))
nltk.download()

However, I am met with the following error:

HTTP Error 407: Proxy Authentication Required (The ISA Server requires   authorization to fulfill the request. Access to the Web Proxy Filter is denied.

Despite giving the proxy details why am I getting this error?

Please help, Arc.

3
Wrong proxy credentials. - 404pio
Where did you see an instruction to add proxy info? - Spaceghost
I saw the instructions in nltk.org/data.html since i am using proxy server at college I needed to use the instruction above to solve the problem - Archana

3 Answers

2
votes

Try this format instead for setting the proxy details:

import nltk
nltk.set_proxy('https://username:[email protected]:port')

It worked for me.

1
votes

This work for me on macOS 10.15

Search for 'Install Certificates.command' in finder and open it.

Now,

import nltk
nltk.download()

It will open the NLTK downloader then you can select and download the required package.

-1
votes

I also faced the same issue but i could able to solve with this

> nltk.set_proxy('xxx.xx.xx.xx:yy' , 'username', 'passcode')