我正在尝试下载整本教科书,但只显示内核忙。我让它保持半个小时,但仍然处于忙碌状态。当我停止时,出现以下错误。有人可以指导我如何解决这个问题,或者我是否没有正确地按照步骤操作。
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-3-fec50ed38a60> in <module>()
1 import nltk
----> 2 nltk.download()
C:\Users\\Anaconda2\lib\site-packages\nltk\downloader.pyc in download(self, info_or_id, download_dir, quiet, force, prefix, halt_on_error, raise_on_error)
659 # function should make a new copy of self to use?
660 if download_dir is not None: self._download_dir = download_dir
--> 661 self._interactive_download()
662 return True
663
C:\Users\\Anaconda2\lib\site-packages\nltk\downloader.pyc in _interactive_download(self)
980 if TKINTER:
981 try:
--> 982 DownloaderGUI(self).mainloop()
983 except TclError:
984 DownloaderShell(self).run()
C:\Users\\Anaconda2\lib\site-packages\nltk\downloader.pyc in mainloop(self, *args, **kwargs)
1715
1716 def mainloop(self, *args, **kwargs):
-> 1717 self.top.mainloop(*args, **kwargs)
1718
1719 #/////////////////////////////////////////////////////////////////
C:\Users\\Anaconda2\lib\lib-tk\Tkinter.pyc in mainloop(self, n)
1127 def mainloop(self, n=0):
1128 """Call the mainloop of Tk."""
-> 1129 self.tk.mainloop(n)
1130 def quit(self):
1131 """Quit the Tcl interpreter. All widgets will be destroyed."""
KeyboardInterrupt:
Jupyter Notebook 中使用的命令
import nltk
nltk.download()
nltk.download()
尝试打开图形界面进行下载。请尝试在不使用 jupyter notebook 的情况下使用它。https://dev59.com/Um025IYBdhLWcg3wtoVA 有关如何在终端上无需 GUI 安装它的信息。 - Konrad