nltk.download() after installing nltk, but I am having the following error message:
n [5]: nltk.download()
---------------------------------------------------------------------------
URLError Traceback (most recent call last)
<ipython-input-5-a1a554e5d735> in <module>()
----> 1 nltk.download()
/usr/lib/python2.7/dist-packages/nltk/downloader.pyc in download(self, info_or_id, download_dir, quiet, force, prefix, halt_on_error, raise_on_error)
642 # function should make a new copy of self to use?
643 if download_dir is not None: self._download_dir = download_dir
--> 644 self._interactive_download()
645 return True
646
/usr/lib/python2.7/dist-packages/nltk/downloader.pyc in _interactive_download(self)
958 if TKINTER:
959 try:
--> 960 DownloaderGUI(self).mainloop()
961 except TclError:
962 DownloaderShell(self).run()
/usr/lib/python2.7/dist-packages/nltk/downloader.pyc in __init__(self, dataserver, use_threads)
1182 self._init_widgets()
1183 self._init_menu()
-> 1184 self._fill_table()
1185 self._show_info()
1186 self._select_columns()
/usr/lib/python2.7/dist-packages/nltk/downloader.pyc in _fill_table(self)
1449 items = self._ds.models()
1450 elif self._tab == 'collections':
-> 1451 items = self._ds.collections()
1452 else:
1453 assert 0, 'bad tab value %r' % self._tab
/usr/lib/python2.7/dist-packages/nltk/downloader.pyc in collections(self)
487
488 def collections(self):
--> 489 self._update_index()
490 return self._collections.values()
491
/usr/lib/python2.7/dist-packages/nltk/downloader.pyc in _update_index(self, url)
812 # Download the index file.
813 self._index = nltk.internals.ElementWrapper(
--> 814 ElementTree.parse(urllib2.urlopen(self._url)).getroot())
815 self._index_timestamp = time.time()
816
/usr/lib/python2.7/urllib2.pyc in urlopen(url, data, timeout)
125 if _opener is None:
126 _opener = build_opener()
--> 127 return _opener.open(url, data, timeout)
128
129 def install_opener(opener):
/usr/lib/python2.7/urllib2.pyc in open(self, fullurl, data, timeout)
402 req = meth(req)
403
--> 404 response = self._open(req, data)
405
406 # post-process response
/usr/lib/python2.7/urllib2.pyc in _open(self, req, data)
420 protocol = req.get_type()
421 result = self._call_chain(self.handle_open, protocol, protocol +
--> 422 '_open', req)
423 if result:
424 return result
/usr/lib/python2.7/urllib2.pyc in _call_chain(self, chain, kind, meth_name, *args)
380 func = getattr(handler, meth_name)
381
--> 382 result = func(*args)
383 if result is not None:
384 return result
/usr/lib/python2.7/urllib2.pyc in http_open(self, req)
1212
1213 def http_open(self, req):
-> 1214 return self.do_open(httplib.HTTPConnection, req)
1215
1216 http_request = AbstractHTTPHandler.do_request_
/usr/lib/python2.7/urllib2.pyc in do_open(self, http_class, req)
1182 except socket.error, err: # XXX what error?
1183 h.close()
-> 1184 raise URLError(err)
1185 else:
1186 try:
URLError: <urlopen error [Errno 110] Connection timed out>
In [6]: