我正在尝试将节点Web应用程序上传到heroku。此节点应用程序使用python-shell
运行python文件。当我将python
和node
buildpack添加到heroku时,它停止让我将应用程序推送到heroku,从而出现以下错误消息:
! [remote rejected] master -> master (pre-receive hook declined)
错误:无法将某些引用推送到“ https://git.heroku.com/my-app.git”
构建日志说:
//... Installing node modules ...
-----> Build succeeded!
-----> Python app detected
! Requested runtime (Python-3.6.5) is not available for this stack (heroku-18).
! Aborting. More info: https://devcenter.heroku.com/articles/python-support
! Push rejected, failed to compile Python app.
! Push failed
日志显示:
Error: ModuleNotFoundError: No module named 'tensorflow'
如何将该Web应用程序上传到heroku?
我有一个runtime.txt文件,其中包含:python-3.6.5
和一个requirements.txt
文件,它们都位于目录的根目录中。 (该python文件不在根文件夹中,而是嵌套在另一个文件夹中。此外,该应用程序在本地运行。)