python - 请求的运行时(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
解决方案
推荐阅读
- mysql - 我想检查数组中的任何值是否在数据库中
- google-cloud-firestore - Firestore beginTransaction REST API 在创建读写事务时返回 PERMISSION_DENIED
- scala - 如何从字面上调用资源密集型功能
- c - 何时允许对指针进行类型转换?
- python - 如何使用 DLL 在 python 中使用 pyTest 构建夹具,运行全套测试,然后重建夹具
- javascript - 为什么我的嵌套 For 循环在使用 Vue 时只返回第二个数组的第一个值?
- java - 如何从片段内调用 asyncTask 到外部服务
- java - 图形类画的圆不动
- javascript - “信用卡”输入栏不可用
- html - 重复第 n 个子值