pythonpython-3.xtimeoutanacondanltk

Can't install nltk, due to errno 10060


I have been trying to install nltk but every time i try to do so, i got the same error:

Errno 10060 A connection attempt failed because the connected party did not properly respond after a period of time [closed]

My python interpreter runs on Anaconda Background, that is installed on Anaconda and i have been running the command nltk.download() in the jupyter-notebook but the same error comes up every time.

I tried by disabling the proxies and disabling the web security as well and by running the internet connection by my phone data and wifi both.

This is the window i get:

x


Solution

  • Looks like NTLK does not get an answer from the download URL (I get this error when I have, for example, a typo in a URL).

    The documentation indicates to launch the command from an administrator session. Is this your case? You may have to run jupyter in administrator mode.

    You can try, as indicated in the documentation, to launch the command through a proxy (there are some free, do a little research) :

    >>> nltk.set_proxy('http://proxy.example.com:3128', ('USERNAME', 'PASSWORD'))
    >>> nltk.download()