Ignoring the requirements.txt

Hey folks,

very happy netlify user here so far however, now we have an issue. We’re hosting our project-documentation via netlify. Our project is built on python. Although the page-generation is also built in python, i’m keeping that separate as we might use different python-versions. It worked so far setting the Env-Var PYTHON_VERSION to 3.8 but now we’re migrating to python 3.10 and for some reason netlify has an issue installing the requirements.txt.

https://app.netlify.com/sites/specter-desktop-docs/deploys/6274dc91af90a900082301ec

10:31:01 AM: Collecting backports.zoneinfo; python_version >= "3.6" and python_version < "3.9"
10:31:01 AM: ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
10:31:01 AM:     backports.zoneinfo; python_version >= "3.6" and python_version < "3.9" from https://files.pythonhosted.org/packages/1a/ab/3e941e3fcf1b7d3ab3d0233194d99d6a0ed6b24f8f956fc81e47edc8c079/backports.zoneinfo-0.2.1-cp38-cp38-manylinux1_x86_64.whl#sha256=7b0a64cda4145548fed9efc10322770f929b944ce5cee6c0dfe0c87bf4c0c8c9 (from pytz-deprecation-shim==0.1.0.post0->-r requirements.txt (line 400))

So i’d be very happy if netlify would simply ignore my requiements.txt. This seems to be possible if you use yarn by NETLIFY_USE_YARN. How can i make netlify ignore the requirements.txt?

I looked into the build-image and it doesn’t seem to be possible:

Or am i missing something?

thanks

k9ert

Hey @k9ert,

Netlify doesn’t support Python 3.10 yet. Python 3.8 is the max supported in the Focal build image. So, even if there was a way to ignore, which there isn’t (at least not without getting creative), I don’t think what you’re trying would work.

I think you missed the point here. I’m not trying to use netlify with python 3.10. I have a requirements.txt and i would love if netlify would not misinterpret it as this is relevant to it.
My repo is not mainly a netlify repo and i would like to simply continue to use it as before even as i’m migrating my application to python 3.10.

I’d be happy to get creative here, if you can give me some guidance on how to make that happen.

Hey @k9ert,

Sorry to miss your point, but even after discussing this with the team, it’s still not perfectly clear to us what you’re trying.

For instance, I first read this:

which made me think you’re trying to use Python 3.10 on Netlify.

Here, you said that you want us to ignore that file. But, if we ignore that, how do you expect your site to build? Do you not need the pip dependencies from that file?

Ignoring requirements.txt is not possible at the moment, but I’m unsure why you want to ignore that.

Are you having multiple projects in the same repo and trying to build one on Netlify, while trying to ignore others?