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