HTTP: Proxy Authentification Error for nltk.download()

给你一囗甜甜゛ 提交于 2019-12-05 19:45:30

nltk have shifted from the googlecode.com but still most of the resources on web continues to give its reference.

update the current data server setting in "/usr/lib/python2.7/dist-packages/nltk/downloader.py" file on line 370 from:

DEFAULT_URL = 'http://nltk.googlecode.com/svn/trunk/nltk_data/index.xml'

to

DEFAULT_URL = "http://nltk.github.com/nltk_data/"
Rama

Changing the URL as stated in the other answer is required, but the other problem is proxy authentication. Use the export command and set all the proxy variables i.e. http, https, ftp and socks, like so.

export http_proxy='http://username:'password'@202.141.80.80:3128/' 
export https_proxy='https://username:'password'@202.141.80.80:3128/' 

Similarly ftp_proxy.

export socks_proxy='socks://username:'password'@202.141.80.80:3128/' 

to see if the variables are set use export -p

The password may or may not be within quotes. The apt.conf file should also have these setting as explained in many other sites.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!