Question

Digital Ocean Apps deployment fails with "Requested runtime 'python-3.9.18' is not available for this stack (heroku-22)

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 │ -----> Using Python version specified in runtime.txt 2023-10-15T07:47:26.340853113Z │ !   Requested runtime 'python-3.9.18' is not available for this stack (heroku-22). 2023-10-15T07:47:26.340887065Z │ !   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:

  • I have tried restarting the Digital Ocean App deployment process, but I still receive the same error message.
  • I have checked that there are no other errors in the Digital Ocean App deployment logs.
  • I have tried searching for the error message online, but I have not been able to find any helpful solutions.

Related Docs:

Thank you for your time and assistance.

Show comments

Submit an answer


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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
October 16, 2023

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:

  1. 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.

  2. 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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel