我正在尝试使用nltk.txt文件在heroku中安装nltk软件包。 int我的nltk.txt文件只写了punkt。在requirements.txt文件中写入了nltk。 但是当按下它时会显示错误。 请帮助解决我的问题
remote: -----> Python app detected
remote: ! Python has released a security update! Please consider upgrading to python-3.6.7
remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing requirements with pip
remote:
remote: -----> Downloading NLTK corpora…
remote: -----> Downloading NLTK packages: tokenize
remote: /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
remote: warn(RuntimeWarning(msg))
remote: Traceback (most recent call last):
remote: [nltk_data] Error loading tokenize : Package 'tokenize ' not found in
remote: File "/app/.heroku/python/lib/python3.6/runpy.py", line 193, in _run_module_as_main
remote: [nltk_data] index
remote: "__main__", mod_spec)
remote: File "/app/.heroku/python/lib/python3.6/runpy.py", line 85, in _run_code
remote: exec(code, run_globals)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/downloader.py", line 2272, in <module>
remote: Error installing package. Retry? [n/y/e]
remote: halt_on_error=options.halt_on_error)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/nltk/downloader.py", line 681, in download
remote: choice = input().strip()
remote: EOFError: EOF when reading a line
remote: -----> Running post-compile hook
remote: -----> Running install_nltk_data
remote: -----> Starting nltk data installation
remote: /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
remote: warn(RuntimeWarning(msg))
remote: [nltk_data] Downloading package punkt to /app/nltk_data...
remote: [nltk_data] Unzipping tokenizers/punkt.zip.
remote: bin/install_nltk_data: line 21: cd: '/app/nltk_data': No such file or directory
remote: -----> Finished nltk data installation
remote: -----> Post-compile done
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing...
remote: Done: 49M
remote: -----> Launching...
remote: Released v19
remote: https://mysterious-coast-63128.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/mysterious-coast-63128.git
7b1a415..9b14971 master -