首页 > 解决方案 > 请求的运行时(python 3.8)不适用于此堆栈(heroku-18)

问题描述

我正在尝试使用 Heroku 部署一个应用程序,但它无法正常工作......我在这里查看了许多其他帖子,但出现了同样的错误,但我没有找到问题所在。

我的机器上安装了 Python 3.8.5,它受 Heroku-18 的支持,但是无论出于何种原因,当我执行“git push heroku master”时,它会看到 python 3.8:

-----> Python app detected
!     Requested runtime (python 3.8) is not available for this stack (heroku-18).
!     Aborting.  More info: https://devcenter.heroku.com/articles/python-support
!     Push rejected, failed to compile Python app.

我有 python-3.8.5 的 runtime.txt 文件:

python-3.8.5

我还专门检查了我的电脑上的版本,并尝试重新安装但没有成功,要么:

$ python -V
Python 3.8.5

而且,从 2020 年 7 月 21 日起再次支持它: https ://devcenter.heroku.com/changelog-items/1833

我想问题是,我如何让 Heroku 识别出我安装了正确的版本?我确定这是我忽略的小东西,但我无法弄清楚。

这是我的目录,显示它位于根目录中:


/my_site (masterbranch)
$ ls
about_app/  
ckeditor/     
my_site/  
staticfiles/
blog_app/   
contact_app/  
home_app/   
media/         
static/      
templates/
requirements.txt
Procfile
Procfile.windows 
runtime.txt  
db.sqlite3  
manage.py*  

运行时.txt:

$ cat runtime.txt
python-3.8.5

标签: pythondjangoheroku

解决方案


推荐阅读