0

I got problem when I tried to deploy my Flask App through Heroku. I have already updated my python version to python-3.9.11 but it still showed Requested runtime (python-3.6.4) is not available for this stack (heroku-20). I never installed python-3.6.4. I am not sure what really make me fail to deploy. Thank you very much!!

PS D:\Flask-heroku> git add .
PS D:\Flask-heroku> git commit -am "make it better"
On branch masterbranch
nothing to commit, working tree clean
PS D:\Flask-heroku> git push heroku master
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (6/6), 1.02 KiB | 1.02 MiB/s, 
done.
Total 6 (delta 0), reused 0 (delta 0), pack-reused 0remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Building on the Heroku-20 stack      
remote: -----> Determining which buildpack to use for this app
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote:  !     Requested runtime (python-3.6.4) is not available for this stack (heroku-20).
remote:  !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote:  !
remote:  ! ## Warning - The same version of this code has already been built: e9c5941a39d3fc3777892221db05070aed9cda73
remote:  !
remote:  ! We have detected that you have triggered 
a build from source code with version e9c5941a39d3fc3777892221db05070aed9cda73
remote:  ! at least twice. One common cause of this 
behavior is attempting to deploy code from a different branch.
remote:  !
remote:  ! If you are developing on a branch and deploying via git you must run:
remote:  !
remote:  !     git push heroku <branchname>:main    
remote:  !
remote:  ! This article goes into details on the behavior:
remote:  !   https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: !       Push rejected to python-training-monokumafile.
remote:
To https://git.heroku.com/python-training-monokumafile.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/python-training-monokumafile.git'

I had already checked my python version.

D:\Flask-heroku> python --version
Python 3.9.11
  • This has nothing to do with the version of Python you are using locally. It's driven entirely by the contents of your `runtime.txt`. – ChrisGPT was on strike May 11 '22 at 03:39
  • In particular, see [this answer](https://stackoverflow.com/a/54837857/354577) and make sure to follow the link to see currently supported runtimes. They have changed since that answer was written. – ChrisGPT was on strike May 11 '22 at 11:51

0 Answers0