dry-orange-3870
05/15/2024, 9:37 PMpants lint ::
on our repo. No one else on the team is able to reproduce the issue. Based on the error, it looks like Pants is trying to use Python 3.7 while building the PEX for black. However:
• We have a separate resolve set up for black. It's configured to use Python 3.10.12
• Running python --version
produces 3.10.12
• Running pyenv versions
shows both 3.10.12 (required for everything that isn't pants in the repo) and 3.9.5 (required for pants) are installed.
• Python 3.10.12 is set via pyenv global 3.10.12
Why is it trying to use the system Python 3.7? (He's on Mac OSX with an ARM processor like most others on the team)
If necessary, I can put together a stacktrace to post (I'll just need some time to obfuscate a couple things)wide-midnight-78598
05/15/2024, 9:40 PMscie-pants
?wide-midnight-78598
05/15/2024, 9:40 PMdry-orange-3870
05/15/2024, 9:42 PMwide-midnight-78598
05/15/2024, 9:42 PMdry-orange-3870
05/15/2024, 9:42 PMdry-orange-3870
05/15/2024, 9:42 PMscie-pants
?wide-midnight-78598
05/15/2024, 9:43 PMdry-orange-3870
05/15/2024, 9:43 PMdry-orange-3870
05/15/2024, 9:43 PMwide-midnight-78598
05/15/2024, 10:38 PMwide-midnight-78598
05/15/2024, 10:43 PMpants --keep-sandboxes=always lint ::
(or whatever) and then check out the logs for that run in .pantsd and see what python is being picked up in the sandboxes, and that might provide an indication of why it's being picked up.
For example, on my machine, there is a sandbox that has this:
Find interpreter for constraints: CPython==3.9.*
And in there, is the __run.sh file that gets called, as well as the path (and whatever else).dry-orange-3870
05/16/2024, 3:09 PM