3

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.

spaniard81
  • 61
  • 1
  • 8
Archana
  • 193
  • 1
  • 2
  • 10

3 Answers3

4

Try this format instead for setting the proxy details:

import nltk
nltk.set_proxy('https://username:password@proxy.example.com:port')

It worked for me.

spaniard81
  • 61
  • 1
  • 8
grshankar
  • 417
  • 2
  • 14
2

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.

Vivek Tiwari
  • 437
  • 4
  • 9
-1

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

> nltk.set_proxy('xxx.xx.xx.xx:yy' , 'username', 'passcode')
Rudraksha
  • 37
  • 4