0

I have been trying to install nltk.data for a project. As described in this documentation, I tried to install it using both methods mentioned.

  1. Through python:

    import nltk nltk.download()

The problem is in the next step, ( please find the screenshot attached).error screenshot

The error message is:

Packages:
Error connecting to server: [Errno 113] No route to host
  1. Through command line:

sudo python -m nltk.downloader -d /usr/local/share/nltk_data

This resulted in the same issue too.

As mentioned in this answer, my DEFAULT_URL was https://raw.githubusercontent.com/nltk/nltk_data. Even after changing it to http://www.nltk.org/nltk_data/, I am getting the same problem.

Can anybody help, please?

Community
  • 1
  • 1
pnv
  • 1,437
  • 3
  • 23
  • 52
  • Can you post the output of `python3 -c 'import nltk; print(nltk.__version__); print(nltk.data.path)'` in your question? – alvas Mar 04 '16 at 21:13
  • Please reinstall the latest version of NLTK from https://pypi.python.org/pypi/nltk – alvas Mar 04 '16 at 21:15
  • I feel that it might be connected to not having an x-server or similar desktop environment. Cause it doesn't run on my linux server, but it runs fine on my mac, opens up a window (which is impossible on my linus with gui) with menus to install packages. – antonavy Jun 28 '17 at 18:10

0 Answers0