首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在具有nltk的heroku上部署flask应用程序

无法在具有nltk的heroku上部署flask应用程序
EN

Stack Overflow用户
提问于 2020-05-11 20:19:55
回答 1查看 226关注 0票数 1

当我将其部署到github时,我收到以下错误

代码语言:javascript
复制
ERROR: google-auth 1.14.1 has requirement setuptools>=40.3.0, but you'll have setuptools 39.0.1 which is incompatible.
       Installing collected packages: cachetools, certifi, chardet, click, Corpora, MarkupSafe, Jinja2, Werkzeug, itsdangerous, Flask, pytz, urllib3, idna, requests, pyasn1, rsa, six, pyasn1-modules, google-auth, protobuf, googleapis-common-protos, google-api-core, httplib2, google-auth-httplib2, uritemplate, google-api-python-client, gunicorn, joblib, regex, tqdm, nltk, numpy, python-dateutil, pandas, retrying, plotly, pycountry, vader-sentiment, youtube-data-api, youtube-python
       Successfully installed Corpora-1.0 Flask-1.1.2 Jinja2-2.11.2 MarkupSafe-1.1.1 Werkzeug-1.0.1 cachetools-4.1.0 certifi-2020.4.5.1 chardet-3.0.4 click-7.1.2 google-api-core-1.17.0 google-api-python-client-1.8.2 google-auth-1.14.1 google-auth-httplib2-0.0.3 googleapis-common-protos-1.51.0 gunicorn-20.0.4 httplib2-0.17.3 idna-2.9 itsdangerous-1.1.0 joblib-0.14.1 nltk-3.5 numpy-1.18.4 pandas-1.0.3 plotly-4.6.0 protobuf-3.11.3 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycountry-19.8.18 python-dateutil-2.8.1 pytz-2020.1 regex-2020.4.4 requests-2.23.0 retrying-1.3.3 rsa-4.0 six-1.14.0 tqdm-4.46.0 uritemplate-3.0.1 urllib3-1.25.9 vader-sentiment-3.2.1.1 youtube-data-api-0.0.17 youtube-python-1.0.13
-----> Downloading NLTK corpora…
-----> Downloading NLTK packages: corpora wordnet pros_cons reuters vader_lexicon setiment-vader
/app/.heroku/python/lib/python3.6/runpy.py:125: 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 corpora: Package 'corpora' not found in
[nltk_data]     index
Error installing package. Retry? [n/y/e]
Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/app/.heroku/python/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/app/.heroku/python/lib/python3.6/site-packages/nltk/downloader.py", line 2538, in <module>
    halt_on_error=options.halt_on_error,
  File "/app/.heroku/python/lib/python3.6/site-packages/nltk/downloader.py", line 790, in download
    choice = input().strip()
EOFError: EOF when reading a line

这是我的repo https://github.com/ejekanshjain/youtube-comment-sentiment

但是这在我的本地机器上运行得很好。

如何解决这个问题?

EN

回答 1

Stack Overflow用户

发布于 2020-05-12 02:20:41

语料库不是NLTK中的一个包。如果你尝试下载它,你会得到一个错误。从nltk.txt文件中删除语料库。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61729563

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档