[英]Heroku not pushing Django App due to buildpack error
我正在嘗試使用 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.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"
以及一個 requirements.txt 文件,其中包含:
Django==2.0.2
gunicorn==19.7.1
pytz==2018.3
whitenoise==3.3.1
我的requirements.txt、Procfile和runtime.txt都在項目目錄下。
我看不出我哪里出錯了 - 有什么想法嗎?
謝謝大家。
我遇到過這種情況,我瀏覽了大約 3 個小時,然后我才知道我的文件被命名為 requirements.txt 的愚蠢錯誤,如果這沒有幫助,它應該是 requirements.txt,請查看 heroku 站點上支持的 python 運行時版本
驗證“requirements.txt”中的“.txt”沒有重復。
當我命名文件時,我明確輸入了 requirements.txt 這導致了一個名為
未檢測到的 requirements.txt.txt。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.