所以當我嘗試部署我的主分支時出現這個錯誤,我已經設定了我的 requirements.txt、runtime.txt 和 Procfile 但我仍然收到這個錯誤
-----> Building on the Heroku-20 stack
-----> Using buildpack: heroku/python
-----> Python app detected
-----> Using Python version specified in runtime.txt
! Requested runtime (python - 3.9.7) is not available for this stack (heroku-20).
! Aborting. More info: https://devcenter.heroku.com/articles/python-support
! Push rejected, failed to compile Python app.
! Push failed
我的requirements.txt檔案
asgiref==3.4.1
dj-database-url==0.5.0
Django==3.2.7
django-heroku==0.3.1
gunicorn==20.1.0
Pillow==8.4.0
psycopg2==2.9.2
python-decouple==3.5
pytz==2021.3
sqlparse==0.4.2
whitenoise==5.3.0
請幫忙
uj5u.com熱心網友回復:
如第五行中所述,heroku 堆疊 20 不支持您的 Python 版本以檢查支持的運行時,請參閱Heroku 檔案
uj5u.com熱心網友回復:
Heroku 堆疊支持python-3.9.9,因此請在您的runtime.txt:
python-3.9.9
在https://devcenter.heroku.com/articles/heroku-20-stack查看堆疊
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/385934.html
標籤:姜戈 英雄联盟 Django 休息框架 django-views heroku-api
上一篇:將Vapor應用程式部署到Heroku失敗,因為“錯誤:‘URLSession’型別的值沒有成員‘資料’”
下一篇:HerokuDjango登錄路由
