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

问题描述

django (2.0) 我正在尝试将我的 django 应用程序上传到 heroku,但我不能,因为它说请求的运行时(python 3.7.2)不可用。

Counting objects: 100% (1725/1725), done.
Delta compression using up to 4 threads
Compressing objects: 100% (1721/1721), done.
Writing objects: 100% (1725/1725), 9.34 MiB | 21.00 KiB/s, done.
Total 1725 (delta 93), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote:  !     Requested runtime (Python 3.7.2) is not available for this stack (heroku-18).
remote:  !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to mubashartech.
remote:
To https://git.heroku.com/mubashartech.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/mubashartech.git'

标签: pythondjangowebheroku

解决方案


Heroku Docs显示当前支持的 Python 3.7.X 版本是 3.7.3 。

runtime.txt将文件中的值更改python-3.7.3为使用 Python 3.7.3。


推荐阅读