簡體   English   中英

推送被拒絕編譯 python 應用程序失敗

[英]Push rejected failed to compile python app

所以當我嘗試部署我的主分支時出現這個錯誤,我已經設置了我的 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

請幫忙

如第五行所述,heroku 堆棧 20 不支持您的 python 版本以檢查支持的運行時,請參閱Heroku 文檔

Heroku 堆棧支持python-3.9.9 ,因此請在runtime.txt中指定:

python-3.9.9

查看https://devcenter.heroku.com/articles/heroku-20-stack的堆棧

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM