要求代理身份验证NLTK下载 [英] Proxy Authentication Required NLTK download

查看:109
本文介绍了要求代理身份验证NLTK下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已通过以下步骤在Windows 8、64位计算机,sublime text和nltk 3.0.1上安装了python 2.7.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)

安装NLTK: http://pypi.python.org/pypi/nltk 在nltk目录中,运行setup.py以安装nltk(从CMD提示符下)

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

将环境变量更改为%PYTHONPATH%; C:\ Python27; C:\ Python27 \ DLLs; C:\ Python27 \ Lib; C:\ Python27 \ Lib \ lib2to3; C:\ Python27 \ Scripts with使用C:\ Python27

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

测试安装:开始> Python34,然后输入import nltk 崇高的类型

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?

请帮助, 弧形.

推荐答案

尝试使用以下格式来设置代理详细信息:

Try this format instead for setting the proxy details:

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

对我有用.

这篇关于要求代理身份验证NLTK下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆