Sometimes python is not found, sometimes it is

My site name is flamboyant-northcutt-4eefaf and sometimes when I push to git or trigger a deploy in the UI, my deployment fails because python cannot be found. However, sometimes it can be found, even when there are no code changes on my side. This has been happening for me for a few weeks.

You can checkout this screenshot:

The are no code differences between the failed deploy where python: command not found and the successful one, HEAD is cee2… I pushed and it failed, then I re-triggered the deploy twice in the UI, and it failed one time with python: command not found and then the second time it had python and succeeded.

I’ve tried to add a runtime.txt and I’ve added an ENV var for PYTHON_VERSION, but they don’t seem to affect whether python can be found or not. I’m not sure how to convince the netlify build system to include python all the time.

Does anyone have any tips or ideas?

Hi, welcome to the forums! It’s difficult to identify to root cause of the problem. Have you tried specifying a python version in your runtime.txt file and make sure that version of Python is one that we support.

Hey Sam, I have a runtime.txt with 3.8 which I got from here: Available software at build time | Netlify Docs

Like I said, python is there during some builds, but not others, with no code changes on my side. I’d like for python to always be there, but since it comes and gos without me making any changes, it doesn’t look like something I have control over.

It hasn’t happened in a while, so I am going to mark this as solved for now. I don’t like intermittent issues like this that I can’t control or have visibility into, it leaves me here clicking the deploy button in the UI over and over until it works – which is what I have had to do when this problem occurs. :sweat: