Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Error : Python 3.9 has come to End of Support

Hi Community, 

I have an application running of Google Cloud Console running in App Engine which has all the old dependencies. I was trying to create a staging environment in that very project with python runtime version: 3.9.6 and when I do gcloud app deploy I get the error saying 


ERROR (gcloud.app.deploy) INVALID_ARGUMENT: Error(s) encountered validating runtime. Your runtime version for python is past End of Support. Please upgrade to the latest runtime version available..


I am currently using gcloud sdk version 491.0.0 and have also tried older versions.

Need help ASAP!

0 2 1,661
2 REPLIES 2

Hi @darshvaghasia,

Welcome to Google Cloud Community!

It looks like you're having trouble running your Python application on Cloud Run. Here are some steps you can take to troubleshoot the issue:

  1. Check your runtime configuration: When deploying your app using gcloud app deploy, make sure the runtime field in the configuration correctly specifies your Python version. For instance, you might use runtime:
    runtime_config:
        operating_system: "ubuntu18"
        runtime_version: "3.9"

  2. Verify your dependencies: Inspect your requirements.txt file. Ensure that all dependencies are compatible with the Python version you're using. If a dependency isn't compatible, you'll need to find a suitable alternative or update the dependency.

  3. Review your Dockerfile: If you're using a Dockerfile, double-check that the FROM instruction specifies a supported Python version image. For example, you might use FROM python:3.9.

I hope the above information is helpful.

You didn't say if you're running on App Engine Standard or Flex

1. According to Google's official docs (standard, Flexible) Python 3.9 has not reached end of support. It's end of support is October 5, 2025. I think the issue is that you're specifying your runtime incorrectly and so Google picks the default value (Python 2.7) which has reached end of support.

2. If you're using App Engine standard, you should set your runtime to 
    runtime: python39

3. If you're using Flexible, then the format for specifying runtime version differs for Python 3.7/earlier and versions > Python 3.7. See this doc for how to specify your runtime

 

 

    ......NoCommandLine ......
https://nocommandline.com
        Analytics & GUI for 
App Engine & Datastore Emulator