NLTK ERROR when download punkt
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?
https://www.nltk.org/data.html#installing-via-a-proxy-web-server
@RiseInRose it works for me!!! thanks!
import nltk
nltk.set_proxy('http://192.168.1.10:4780')
nltk.download('cmudict')