nltk_data icon indicating copy to clipboard operation
nltk_data copied to clipboard

NLTK ERROR when download punkt

Open mengxun1437 opened this issue 5 years ago • 2 comments

here is the error information: (SQLMODEL) mengxun@mengxun:~/SQLMODEL$ python -m nltk.downloader punkt /home/mengxun/anaconda3/envs/SQLMODEL/lib/python3.8/runpy.py:127: RuntimeWarning: 'nltk.downloader' found in sys.modules after import of package 'nltk', but prior to execution of 'nltk.downloader'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) [nltk_data] Error loading punkt: <urlopen error [Errno 111] Connection [nltk_data] refused> Error installing package. Retry? [n/y/e] e

system : Ubuntu 20.04

can anyone give me a tip to solve it?

mengxun1437 avatar May 03 '21 05:05 mengxun1437

https://www.nltk.org/data.html#installing-via-a-proxy-web-server

RiseInRose avatar Apr 09 '23 12:04 RiseInRose

@RiseInRose it works for me!!! thanks!


import nltk
nltk.set_proxy('http://192.168.1.10:4780')
nltk.download('cmudict')

jiaohuix avatar Jun 03 '24 10:06 jiaohuix