In the <prerequisites page>, it mentions: ```Apple...
# general
d
In the prerequisites page, it mentions:
Copy code
Apple Silicon (M1/M2) support
If you have Python code, you may need to set your interpreter constraints to Python 3.9+, as many tools, such as Black, will not install correctly when using earlier Python versions.
Is this saying pants itself just needs to run with py3.9+ or the python project needs to run with python3.9+? Our project currently runs on python 3.7.16 and a lot of our eng use M1/M2 macs. Wondering if I should try to set pants up using a container from the get go.
it's not a problem to install python3.9+ locally on our macs
but our repo requires 3.7 (due to a dependency we haven't upgraded yet)
c
just pants itself
also, if you use
scie-pants
, then the python interpreter for pants is included, so you should be good to go out of the box.
@happy-kitchen-89482 those pre-req may need some adjustments in the new world of
scie-pants
..
d
perfect, thanks for the quick replies!
just to clarify, is that prereq "incorrect" then? i.e. I shouldn't set the interpreter constraints to 3.9+?
c
I’m not entirely sure about that note.. in our project at work we use py3.8 as IC and that is working for us on M1s too.
👍 1
d
interesting, can't hurt to just try it locally first I guess
👍 1
c
I’d go with that. Good to be aware of this in case of issues, but if it works… 🙂
w
My understanding of that note was that if you use the fmt/lint plugins, there could be an issue on Mac ARM with a < 3.9 interpreter. My guess is that if your tooling still works, then 🤷
Pants itself needs Python 3.9 to run, or
scie-pants
d
do the fmt/lint plugins not use the system python?
rather than the project python?
w
You know, this is something I keep remembering and having to ask myself/Slack. And in the world of
scie-pants
and the downloaded standalone python, I'm really in a whirlwind 🙂 I thought that the fmt/lint tools run using the same interpreter as specified for the project production code... @curved-television-6568 ?
Everything has been in a "Just Works ™️ " state for my projects for over a year now, so I definitely forget how some of this works under the hood
d
sounds like once we cement the above, I can put up a docs PR for m1 users haha
or at least clarify the prereqs
w
So, you can always specify tooling ICs - https://www.pantsbuild.org/docs/python-linters-and-formatters#configuring-the-tools-eg-adding-plugins https://www.pantsbuild.org/docs/python-interpreter-compatibility The piece I always forget is what the default falls back to, which is why I think it's the project's ICs
d
ah that makes sense... it seems to me setting all the tooling py versions to 3.9+ and setting the project py version to 3.7 hopefully works ootb
w
There may also be the question of whether Rosetta is installed - so if that's different between your team, it may lead to some intermittent shenanigans
👍 1
As an example, it doesn't look like Black has an arm64 mac wheel for python 3.7. https://pypi.org/project/black/#files
c
I’m with SJ here in “it all Works ™️ “-land.. 😬
h
Ah yes, our pre-reqs page shouldn't even mention Python!
I'll fix
Hmm, looks like I already updated the pre-reqs relating to scie-pants. This is more of a python-backend specific thing that may or may not be true
But if it is true, it's true outside of Pants (or reflects a Pants bug), so probably shouldn't be mentioned?
d
(quick comments)
🙏 1