Cannot deploy a simple Flask app (related to old version of pip?)

I’m new to python and have just signed up for the service (I’m on the free tier).

I’ve set up a webservice in Flask that is working properly on my machine (with Visual Studio Code).

When building, it looks like it cannot find a specific version of different packages, including Flask 2.3.2

My guess is that it’s currently using an old version of Pip and that’s why it’s not able to find the required version of the package.

Is there a way I can specify two instructions in the build or both getting the packages from the requirements.txt and install the latest version of pip?

I couldn’t do that from the build command.

I’ve already tried creating a render.yaml file (which I placed in the root) but it looks like it wasn’t read at all.

services:
- type: web
  env: python
  buildCommand: |
    python -m pip install --upgrade pip
    pip install -r requirements.txt
  startCommand: gunicorn getgooglecalendar:app

Thank you,
Andrea

Hey,

You should update the Python version your service is using to a version that you have working locally.

See https://render.com/docs/python-version

Regards.
Jérémy, Render Support

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