简体   繁体   English

推送被拒绝编译 python 应用程序失败

[英]Push rejected failed to compile python app

so i get this error when i try to deploy my master branch, i have set my requirements.txt, runtime.txt and Procfile but i still get this error所以当我尝试部署我的主分支时出现这个错误,我已经设置了我的 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

my requirements.txt file我的 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

please help请帮忙

Your python version is not supported on heroku stack 20 as stated in the fifth line to check supported runtime see Heroku documentation如第五行所述,heroku 堆栈 20 不支持您的 python 版本以检查支持的运行时,请参阅Heroku 文档

Heroku stack supports python-3.9.9 so specify that in your runtime.txt : Heroku 堆栈支持python-3.9.9 ,因此请在runtime.txt中指定:

python-3.9.9

Have a look at the stack at https://devcenter.heroku.com/articles/heroku-20-stack查看https://devcenter.heroku.com/articles/heroku-20-stack的堆栈

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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