出现的问题

在阿里云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 __loadroot = nltk.data.find('{}/{}'.format(self.subdir, zip_name))File "/root/.virtualenvs/T/lib/python3.5/site-packages/nltk/data.py", line 701, in findraise 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.htmlAttempted 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'- '/usr/local/lib/nltk_data'
**********************************************************************During handling of the above exception, another exception occurred:Traceback (most recent call last):File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_innerself.run()File "/usr/lib/python3.5/threading.py", line 862, in runself._target(*self._args, **self._kwargs)File "/root/.virtualenvs/T/lib/python3.5/site-packages/django/utils/autoreload.py", line 54, in wrapperfn(*args, **kwargs)File "/root/.virtualenvs/T/lib/python3.5/site-packages/django/core/management/commands/runserver.py", line 117, in inner_runself.check(display_num_errors=True)File "/root/.virtualenvs/T/lib/python3.5/site-packages/django/core/management/base.py", line 390, in checkinclude_deployment_checks=include_deployment_checks,File "/root/.virtualenvs/T/lib/python3.5/site-packages/django/core/management/base.py", line 377, in _run_checksreturn checks.run_checks(**kwargs)File "/root/.virtualenvs/T/lib/python3.5/site-packages/django/core/checks/registry.py", line 72, in run_checksnew_errors = check(app_configs=app_configs)File "/root/.virtualenvs/T/lib/python3.5/site-packages/django/core/checks/urls.py", line 13, in check_url_configreturn check_resolver(resolver)File "/root/.virtualenvs/T/lib/python3.5/site-packages/django/core/checks/urls.py", line 23, in check_resolverreturn check_method()File "/root/.virtualenvs/T/lib/python3.5/site-packages/django/urls/resolvers.py", line 399, in checkfor pattern in self.url_patterns:File "/root/.virtualenvs/T/lib/python3.5/site-packages/django/utils/functional.py", line 80, in __get__res = instance.__dict__[self.name] = self.func(instance)File "/root/.virtualenvs/T/lib/python3.5/site-packages/django/urls/resolvers.py", line 584, in url_patternspatterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)File "/root/.virtualenvs/T/lib/python3.5/site-packages/django/utils/functional.py", line 80, in __get__res = instance.__dict__[self.name] = self.func(instance)File "/root/.virtualenvs/T/lib/python3.5/site-packages/django/urls/resolvers.py", line 577, in urlconf_modulereturn import_module(self.urlconf_name)File "/root/.virtualenvs/T/lib/python3.5/importlib/__init__.py", line 126, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)File "<frozen importlib._bootstrap>", line 986, in _gcd_importFile "<frozen importlib._bootstrap>", line 969, in _find_and_loadFile "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlockedFile "<frozen importlib._bootstrap>", line 673, in _load_unlockedFile "<frozen importlib._bootstrap_external>", line 665, in exec_moduleFile "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removedFile "/home/recommend_system-master/recommend_system/urls.py", line 18, in <module>import movie_recommend.viewsFile "/home/recommend_system-master/movie_recommend/views.py", line 15, in <module>from movie_recommend.load_data import *File "/home/recommend_system-master/movie_recommend/load_data.py", line 19, in <module>stoplist = stopwords.words('english')File "/root/.virtualenvs/T/lib/python3.5/site-packages/nltk/corpus/util.py", line 123, in __getattr__self.__load()File "/root/.virtualenvs/T/lib/python3.5/site-packages/nltk/corpus/util.py", line 88, in __loadraise eFile "/root/.virtualenvs/T/lib/python3.5/site-packages/nltk/corpus/util.py", line 83, in __loadroot = nltk.data.find('{}/{}'.format(self.subdir, self.__name))File "/root/.virtualenvs/T/lib/python3.5/site-packages/nltk/data.py", line 701, in findraise 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.htmlAttempted to load corpora/stopwordsSearched 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'- '/usr/local/lib/nltk_data'
**********************************************************************

解决的思路:

ubuntu中打开python3解释器

  >>>python3 >>> import nltk>>> nltk.download('stopwords')

再次重启Django项目即可正确运行

阿里云服务器出现 Resource stopwords not found. Please use the NLTK Downloader to obtain the resource:相关推荐

  1. 已解决Resource stopwords not found. Please use the NLTK Downloader to obtain the resource:

    已解决(nltk加载停用词词库报错问题)Resource stopwords not found. Please use the NLTK Downloader to obtain the resou ...

  2. 报错 Resource gutenberg not found.Please use the NLTK Downloader to obtain the resource:

    报错信息 **********************************************************************Resource gutenberg not fo ...

  3. Resource stopwords not found. Please use the NLTK Downloader to obtain the r

    命令行键入 python -m nltk.downloader stopwords 一般可以在C:\Users\Administrator\AppData\Roaming\nltk_data\corp ...

  4. 成功解决Please use the NLTK Downloader to obtain the resource:

    成功解决Please use the NLTK Downloader to obtain the resource: 目录 解决问题 解决思路 解决方法 解决问题 Please use the NLT ...

  5. python操作excel报错,Resource gutenberg not found. Please use the NLTK Downloader to obtain the resouce

    用python帮财务室友写了两个操作EXCEL表格读写汇总数据的程序,发现出现如下错误: 在官网http://nltk.org/nltk_data/下载gutenberg这个包(需要翻墙),放到指定路 ...

  6. win系统的阿里云服务器部署IDEASpringBoot项目保姆级教程

    win系统的阿里云服务器部署SpringBoot项目保姆级教程 前言 配置阿里云服务器 配置环境 环境配置中的坑 还有别的坑的话,私信我我补充......毕竟配置是最基本的,还想咋样... jar包导 ...

  7. 阿里云服务器ECS使用管理多种方式汇总

    阿里云服务器ECS创建后如何使用?阿里云提供多种方法操作云服务器ECS,可以通过Web端ECS管理控制台操作.阿里云客户端.阿里云APP.ECS API.资源编排.运维编排服务.Terraform及A ...

  8. 关于云服务器介绍?什么是阿里云服务器管理?

    转载链接:http://blog.itpub.net/69946374/viewspace-2657585/ 什么是云服务器?云服务器(Elastic Compute Service, ECS)是一种 ...

  9. 阿里云服务器部署项目

    在阿里云服务器上部署自己的项目 小伙伴们是不是想部署自己的项目到服务器上,让自己的朋友,还有广大的网友看到自己的网站呢?下面我就把部署项目到服务器的方法写下来给大家,希望可以帮到有需要的人!!! 前期 ...

最新文章

  1. Mycat之安全设置与监控工具
  2. 两个列表之间移动数据
  3. ModelCheckpoint 讲解【TensorFlow2入门手册】
  4. Google图解:Chrome 快是有原因的,科普浏览器架构!
  5. app 性能优化的那些事(二)
  6. HTML5数据库建模,HTML5的五种客户端离线存储方案
  7. C++ 大话数据结构 09: 中缀表达式 转后缀表达式 计算器
  8. .Net Core应用搭建的分布式邮件系统设计
  9. hihocoder第238周:杨氏矩阵的个数
  10. pythonos模块使用技巧大全_Python os模块常用部分功能总结
  11. UE4材质是什么样的机制
  12. ASP.NET Core中使用Csp标头对抗Xss攻击
  13. git submodule update --init时报错:Failed to recurse into submodule path third_party/protobuf
  14. 在百度地图中获取当前点击 位置的 经纬度 和 地址信息
  15. python虚拟宠物猫
  16. 一文看尽 CVPR 2022 最新 20 篇 Oral 论文
  17. android程序字体大小,Android如何动态调整应用字体大小详解
  18. canvas实战之酷炫背景动画(二)
  19. 通过u盘启动计算机使用ghost安装系统步骤,一键Ghost U盘版安装使用图文教程
  20. 浅谈下关于 速营社 的几个优点

热门文章

  1. 电脑c语言发音,C的发音
  2. 【报错】Cannot uninstall ‘certifi‘. It is a distutils installed project and thus we cannot accurately
  3. 为了摸鱼,我开发了一个工具网站
  4. 第一篇Blog,随便写一点吧:)
  5. Fabric系列 - 多通道技术(Muti-channel)
  6. JetBrains提示我“No suitable licenses associated with account balabala”
  7. 如何看待学术圈的内卷化
  8. PHP阅读文章送积分规则代码,php实现微信公众号文章付费阅读功能的代码分享
  9. unityUI控制角色的动画
  10. 关于团队协作开发的一些思考