Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proxy Authentication Required NLTK download

Tags:

python

nltk

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.

like image 910
Archana Avatar asked Feb 20 '26 07:02

Archana


2 Answers

Try this format instead for setting the proxy details:

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

It worked for me.

like image 179
grshankar Avatar answered Feb 21 '26 20:02

grshankar


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.

like image 23
vivekcs0114 Avatar answered Feb 21 '26 20:02

vivekcs0114



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!