简体   繁体   中英

Heroku not pushing Django App due to buildpack error

I am trying to upload my Django project to Heroku with Python.

My app was built on Python 3.6.1 and when I go to push the app to heroku I am receiving the following error message in the terminal:

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.

remote:

I have included a runtime.txt file containing the following:

python-3.6.1

I also have a Procfile containing:

web: sh -c "cd directory && gunicorn directory.wsgi"

As well as a requirements.txt file containing:

Django==2.0.2
gunicorn==19.7.1
pytz==2018.3
whitenoise==3.3.1

My requirements.txt, Procfile and runtime.txt are all in the project directory.

I can't see where I am going wrong here - any ideas?

Thanks everyone.

我遇到过这种情况,我浏览了大约 3 个小时,然后我才知道我的文件被命名为 requirements.txt 的愚蠢错误,如果这没有帮助,它应该是 requirements.txt,请查看 heroku 站点上支持的 python 运行时版本

Veirify that the ".txt" in "requirements.txt" is not duplicated.

When I named the file, I explicitly typed requirements.txt which resulted in a file named

requirements.txt.txt that was not being detected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM