出现的问题
在阿里云ubuntu服务器布置Django项目中出现如下错误:
Resource stopwords not found.
Please use the NLTK Downloader to obtain the resource:
具体如下所示:
Watching for file changes with StatReloader
Performing system checks...
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/root/.virtualenvs/T/lib/python3.5/site-packages/nltk/corpus/util.py", line 86, in __load
root = nltk.data.find('{}/{}'.format(self.subdir, zip_name))
File "/root/.virtualenvs/T/lib/python3.5/site-packages/nltk/data.py", line 701, in find
raise LookupError(resource_not_found)
LookupError:
**********************************************************************
Resource stopwords not found.
Please use the NLTK Downloader to obtain the resource:
>>> import nltk
>>> nltk.download('stopwords')
For more information see: https://www.nltk.org/data.html
Attempted to load corpora/stopwords.zip/stopwords/
Searched in:
- '/root/nltk_data'
- '/root/.virtualenvs/T/nltk_data'
- '/root/.virtualenvs/T/share/nltk_data'
- '/root/.virtualenvs/T/lib/nltk_data'
- '/usr/share/nltk_data'
- '/usr/local/share/nltk_data'
- '/usr/lib/nltk_data'
- '/us