因此,当我试图部署我的主分支时,我已经设置了我的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请帮帮忙
发布于 2021-12-10 09:27:34
您的python版本在heroku堆栈20上不受支持,如第5行所述,以检查支持的运行时(请参阅Heroku文档 )。
发布于 2021-12-10 12:11:30
Heroku堆栈支持python-3.9.9,因此在runtime.txt中指定
python-3.9.9https://stackoverflow.com/questions/70301969
复制相似问题