Netlify preview reporting deployment failure at initialization

Hi,
I am trying to obtain a netlify preview of PR submitted to a GitHub repository:
https://github.com/carpentries-incubator/SDC-BIDS-dMRI/pull/222

Previews were working previously on a team member’s team:
Netlify App

This team member is no longer involved in the project, and I decided to import the project into my netlify team, under the name sdc-bids-dmri:
Netlify App

However, the deploy of the PR at issue is failing:
Netlify App

with the following error:

5:48:29 PM: Starting to install dependencies
5:48:30 PM: /opt/build-bin/run-build-functions.sh: line 328: /opt/buildhome/pythonpython-3.10/bin/activate: No such file or directory
5:48:30 PM: Error setting python version from runtime.txt

the full trace being:

5:48:30 PM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1
5:48:27 PM: build-image version: 73f16e520fdddf409be6f578c8c2c8941bdf32d3 (focal)
5:48:27 PM: buildbot version: 90ac05c3f28c9e1d686d93dcb23af6d6b5cc1396
5:48:27 PM: Fetching cached dependencies
5:48:27 PM: Failed to fetch cache, continuing with build
5:48:27 PM: Starting to prepare the repo for build
5:48:27 PM: No cached dependencies found. Cloning fresh repo
5:48:27 PM: git clone --filter=blob:none https://github.com/carpentries-incubator/SDC-BIDS-dMRI
5:48:28 PM: Preparing Git Reference refs/heads/main
5:48:29 PM: Starting to install dependencies
5:48:30 PM: /opt/build-bin/run-build-functions.sh: line 328: /opt/buildhome/pythonpython-3.10/bin/activate: No such file or directory
5:48:30 PM: Error setting python version from runtime.txt

Build and deploy settings were left to their default values when importing the project.

What am I missing to make the build preview succeed?

Thanks,

We don’t support Python 3.10: How to use python 3.10 - #6 by achimnol

Dear @hrishikesh ,

thanks for the quick reply.

Our repository does use and is tested using Python 3.8: https://github.com/carpentries-incubator/SDC-BIDS-dMRI/blob/main/.github/workflows/build-test.yaml#L19

Our Binder instance in instructed to use Python 3.8: https://github.com/carpentries-incubator/SDC-BIDS-dMRI/blob/main/binder/environment.yml#L8

So netlify should have no issues previewing our site.

There’s something in your setup that’s trying to use Python 3.10. Thus the problem. We don’t know your project or setup, so we can’t guess where the issue is coming from.

Thanks for the answer.

We don’t know your project or setup, so we can’t guess where the issue is coming from.

I do agree with this, but how does Netlify pick the Python version or where does it look for?

Also, Python 3.8 is 1 year away of reaching its EOL. What should we expect concerning supporting newer versions?

Howdy @jhlegarreta ,

The default Python version is determined by your site’s selected build image. Take a look in our docs to see how to set the version.

Thanks for letting us know about Python 3.8 EOL. We’ve shared this information with our development team for consideration. Unfortunately, there are no further updates at this point.

@audrey thanks for the answer. Will have a look at it.