Python 由于buildpack错误,Heroku未推送Django应用程序
我正试图用Python将我的Django项目上传到Heroku 我的应用程序是基于Python 3.6.1构建的,当我将应用程序推送到heroku时,终端中会收到以下错误消息:Python 由于buildpack错误,Heroku未推送Django应用程序,python,django,heroku,Python,Django,Heroku,我正试图用Python将我的Django项目上传到Heroku 我的应用程序是基于Python 3.6.1构建的,当我将应用程序推送到heroku时,终端中会收到以下错误消息: remote: Compressing source files... done. remote: Building source: remote: remote: -----> App not compatible with buildpack: https://codon-buildpacks.s3.amaz
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to random-appio.
远程:
我已包含一个runtime.txt文件,其中包含以下内容:
python-3.6.1
我还有一个Procfile,其中包含:
web: sh -c "cd directory && gunicorn directory.wsgi"
Django==2.0.2
gunicorn==19.7.1
pytz==2018.3
whitenoise==3.3.1
以及包含以下内容的requirements.txt文件:
web: sh -c "cd directory && gunicorn directory.wsgi"
Django==2.0.2
gunicorn==19.7.1
pytz==2018.3
whitenoise==3.3.1
My requirements.txt、Procfile和runtime.txt都在项目目录中
我看不出哪里出了问题——有什么想法吗
谢谢大家。我遇到了这种情况,我浏览了大约3个小时,然后才知道一个愚蠢的错误,我的文件名为requirement.txt,应该是requirements.txt 如果这没有帮助,请查看heroku站点上支持的python运行时版本,确认“requirements.txt”中的“.txt”没有重复 当我命名该文件时,我显式地键入requirements.txt,结果生成一个名为
未被检测到的requirements.txt.txt。您是否尝试过在
Procfile
文件中更改为:web:gunicorn dottered.path.to.project.wsgi
?刚刚尝试过-没有区别。同样的错误。在推到heroku之前,您是否完成了git add requirements.txt Procfile
和git commit
?是的,所有添加的-+目录都在里面-解决了我的问题。谢谢