Failed deployment because of Werkzeug version

Hi, I am really having a rough time to deploy my web service on Render, first I had newest Flask version which is not working with Render so I degrade it to Flask 2.2.4, but now I’ve got failed deployment because of Werkzeug version, which is 2.3.4, What should I do to have all versions correct, because I will change Werkzeug and then I will got error from another one.
These are my reuirements.txt
Zrzut ekranu 2023-05-29 o 08.38.41
And there is an error

May 29 08:27:59 AM ERROR: Could not find a version that satisfies the requirement Werkzeug==2.3.4 (from -r requirements.txt (line 13)) (from versions: 0.1, 0.2, 0.3, 0.3.1, 0.4, 0.4.1, 0.5, 0.5.1, 0.6, 0.6.1, 0.6.2, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.8.2, 0.8.3, 0.9, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.10, 0.10.1, 0.10.2, 0.10.4, 0.11, 0.11.1, 0.11.2, 0.11.3, 0.11.4, 0.11.5, 0.11.6, 0.11.7, 0.11.8, 0.11.9, 0.11.10, 0.11.11, 0.11.12, 0.11.13, 0.11.14, 0.11.15, 0.12, 0.12.1, 0.12.2, 0.13, 0.14, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.15.3, 0.15.4, 0.15.5, 0.15.6, 0.16.0, 0.16.1, 1.0.0rc1, 1.0.0, 1.0.1, 2.0.0rc1, 2.0.0rc2, 2.0.0rc3, 2.0.0rc4, 2.0.0rc5, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0, 2.1.1, 2.1.2, 2.2.0a1, 2.2.0, 2.2.1, 2.2.2, 2.2.3)
May 29 08:27:59 AM ERROR: No matching distribution found for Werkzeug==2.3.4 (from -r requirements.txt (line 13))
May 29 08:27:59 AM WARNING: You are using pip version 20.1.1; however, version 23.1.2 is available.
May 29 08:27:59 AM You should consider upgrading via the ‘/opt/render/project/src/.venv/bin/python -m pip install --upgrade pip’ command.
May 29 08:27:59 AM ==> Build failed :disappointed:

If I need to install other version of Werkzeug please tell me how.

Thank you.

Hi there,

As a first step you might want to try using a newer version of Python. According to the Werkzeug v2.3.x documentation only Python v3.8 or newer is supported. The default Python version Render uses is v3.7.x.

You’re able to control the version of Python that your service uses by following this doc, https://render.com/docs/python-version.

Let us know if you have any further questions.

Regards,
Mike

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.