Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/331.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 无法在具有nltk的heroku上部署flask应用程序_Python_Heroku_Deployment - Fatal编程技术网

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

Python 无法在具有nltk的heroku上部署flask应用程序,python,heroku,deployment,Python,Heroku,Deployment,当我将其部署到github时,会出现以下错误 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, W

当我将其部署到github时,会出现以下错误

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
错误:google auth 1.14.1的要求setuptools>=40.3.0,但您的setuptools 39.0.1不兼容。
安装收集的软件包:cachetools、certifi、chardet、click、Corpora、MarkupSafe、Jinja2、Werkzeug、ITShazard、Flask、pytz、urllib3、idna、requests、pyasn1、rsa、six、pyasn1模块、google auth、protobuf、GoogleAppis common protos、google api core、httplib2、google-auth-httplib2、uritemplate、google api python客户端、gunicorn、joblib、,正则表达式、TQM、nltk、numpy、python dateutil、pandas、重试、plotly、pycountry、维德情绪、youtube数据api、youtube python
已成功安装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-httplib2-0.0.0.0.3 Gooopis-common-protos-1.51.0-gunicorn-20.0.2-Libitna-1.9.1joblib-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.4.4请求-2.23.0重试-1.3.3.3.3 rsa-4.0 6-1.14.0 tqdm-4.46.0 uritemplate-3.0.0.0.0.0 lib3.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1
----->下载NLTK语料库…
----->下载NLTK软件包:语料库wordnet利与弊路透社维德词典集维德
/app/.heroku/python/lib/python3.6/runpy.py:125:RuntimeWarning:“nltk.downloader”在导入包“nltk”之后,但在执行“nltk.downloader”之前,在sys.modules中找到;这可能导致不可预测的行为
警告(运行时警告(msg))
[nltk_数据]加载语料库时出错:在中找不到包“corpora”
[nltk_数据]索引
安装程序包时出错。重试?[是/否]
回溯(最近一次呼叫最后一次):
文件“/app/.heroku/python/lib/python3.6/runpy.py”,第193行,在主运行模块中
“\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
文件“/app/.heroku/python/lib/python3.6/runpy.py”,第85行,在运行代码中
exec(代码、运行\全局)
文件“/app/.heroku/python/lib/python3.6/site packages/nltk/downloader.py”,第2538行,在
halt_on_error=options.halt_on_error,
下载文件“/app/.heroku/python/lib/python3.6/site packages/nltk/downloader.py”,第790行
选择=输入().strip()
EOF:读取一行时的EOF
这是我的回购协议

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


如何解决此问题?

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

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

从nltk.txt中删除语料库后仍然出现错误您在nltk.txt中放入了错误的包。与情感维德不同,它必须是维德词典。请用它显示的新错误信息编辑你的原始帖子。这可能不是相同的错误消息。从nltk.txt中删除语料库后仍然出现错误。您在nltk.txt中放入了错误的包。与情感维德不同,它必须是维德词典。请用它显示的新错误信息编辑你的原始帖子。这可能不是相同的错误消息。