I encountered an issue while deploying my Flask application to Heroku. During the deployment process, I received an error indicating that the requested Python runtime version is not available for the current stack. Below are the details of the error:
Deployment Command:
git push heroku master
**Error Log:**
Enumerating objects: 7386, done.
Counting objects: 100% (7386/7386), done.
Delta compression using up to 12 threads
Compressing objects: 100% (6529/6529), done.
Writing objects: 100% (7386/7386), 46.64 MiB | 3.29 MiB/s, done.
Total 7386 (delta 812), reused 7361 (delta 803), pack-reused 0
remote: Resolving deltas: 100% (812/812), done.
remote: Updated 7342 paths from 558d57d
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-24 stack
remote: -----> Using buildpack: heroku/python
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote: !
remote: ! Requested runtime 'python-3.12.4' is not available for this stack (heroku-24).
remote: !
remote: ! For a list of the supported Python versions, see:
remote: ! https://devcenter.heroku.com/articles/python-support#supported-runtimes
remote: !
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to ek-cc-trips.
remote:
To https://git.heroku.com/ek-cc-trips.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/ek-cc-trips.git'
I have checked the Heroku supported runtimes and stacks and confirmed that Python 3.12.4 should be supported. However, I am still encountering this error during deployment.
Additional Information:
Project Type: Flask application
Python Version: Python 3.12.4
Heroku App Name: ek-cc-trips
I would greatly appreciate any guidance or suggestions on how to successfully deploy my Flask application to Heroku. Specifically, I am looking for:
Confirmation on whether Python 3.12.4 is supported by Heroku, and if not, which version I should use.
Steps to resolve this issue and ensure a smooth deployment process.
Thanks,
4