Digital Ocean Apps deployment fails with “Requested runtime ‘python-3.9.18’ is not available for this stack (heroku-22)”
File structure:
├── Diamour_backend
├── Dockerfile
├── authent
├── category_images
├── cloud-sql-proxy
├── cloudmigrate.yaml
├── core
├── db.sqlite3
├── env
├── manage.py
├── requirements.txt
├── runtime.txt
├── static
└── uploads
Runtime.txt:
python-3.9.18
Error message:
2023-10-15T07:47:26.100177307Z [34m│[0m -----> Using Python version specified in runtime.txt 2023-10-15T07:47:26.340853113Z [34m│[0m ! Requested runtime 'python-3.9.18' is not available for this stack (heroku-22). 2023-10-15T07:47:26.340887065Z [34m│[0m ! For supported versions, see: https://devcenter.heroku.com/articles/python-support
Although the documentation for Digital Ocean Apps states that Python 3.9.18 is a supported runtime, I am receiving the error message above when I try to deploy my application. I have checked that the runtime.txt file is in the root directory of my application, and that it contains the correct Python version.
I am using the heroku-22 stack, which is the latest stack available for Digital Ocean Apps. And according the support article from Heroku it does support the 3.9.18 version.
Can you please help me troubleshoot this issue?
Additional information:
Related Docs:
https://devcenter.heroku.com/articles/python-support#supported-runtimes
https://docs.digitalocean.com/products/app-platform/reference/buildpacks/python/
Thank you for your time and assistance.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hello,
Recently the App Platform’s default buildpack was upgraded from Ubuntu 18 to 22 which is probably causing the problem for you.
There are two ways of fixing the problem:
Downgrade to Ubuntu 18: By modifying your app spec, you can revert to using Ubuntu 18, which should restore compatibility for your application. You can follow the instructions here: How to Change Stack.
Upgrade Your Software: If you’re keen on benefiting from the updates in Ubuntu 22, consider upgrading your software versions. Afterwards, ensure you select the correct build pack supported in the Ubuntu 22 stack. The guide on how to do this can be found here: How to Upgrade Buildpacks.
If you decide to go with the older build packs from Ubuntu 18, it’s crucial to plan a switch to the ones available in Ubuntu 22 for optimal functionality.
Let me know if you have any questions!
Best,
Bobby