Hi, I get ```No valid Python interpreter found. Fo...
# general
g
Hi, I get
Copy code
No valid Python interpreter found. For `pants_version = "2.11.0"`, Pants requires Python 3.7, 3.8, or 3.9 to run. Please check that a valid interpreter is installed and on your $PATH.
When will Python 3.10 be supported?
s
I'd assume, there will be, especially as distros are updating to 3.10. Keep in mind, it's for running pants itself only. Pants can build Python 3.10
f
Yes but it means you have to have python 3.9 installed on distros that don't have that by default. For fedora, for example, both active versions 35 and 36 come stock with 3.10
s
just like arch and ubuntu
f
Guess we can find out tomorrow... I think US-based Pants employees are off today because of Juneteenth
w
this is covered by https://github.com/pantsbuild/pants/issues/14111 … to be clear: Pants will happily use 3.10 to run your code. it just needs to be run with another version itself
f
yes... but this still requires us to have an older version of python available, which isn't the case with some newer distros
s
@witty-crayon-22786 what's blocking support? i guess it would be reasonable to try to stick to the version most mainstream distributions ship with (which happens to be 3.10 currently)
w
primarily CI time and resources. we’ll want to drop 3.6 when we add 3.10
h
*drop 3.7. We dropped 3.6 a while ago
I would be very pro swapping out Python 3.7 for Python 3.10 in Pants 2.14, especially with Python 3.11 getting ready for release
So, Pants 2.14+ would be able to be run with 3.8, 3.9, and 3.10
f
Sounds good, I worry this may just be a bit narrow
h
what do you mean?
f
I think "default pythons offered in currently supported Ubuntu LTS releases" would be a good target range to go for, as that's going to hit a wide range of people... MacOS users are probably using other means to install python the first place
I think Ubuntu 18.04 has python 3.7 as default, and 22.04 has python 3.10 as default
👍 1
so building wheels that range of 4 pythons there would enable the best out-of-the-box experience for users of the most common linux distro
s
well, we can't artificially push pants' version because of a python version, and afaik, there's a 3rd party support issue with CircleCI (i believe) which blocked python 3.10 until march or so (ready to be educated on this)
f
I don't think Pants should require 3.10, I think it should support running on machines that have no other Python but 3.10 installed
1
s
yeah, but we can't test it, right?
f
Pants runs its own CI in GHA, I don't see how CircleCI affects this
h
definitely agreed supporting the full range is ideal The main reason we haven't (other than implementation time) is it will slow down our CI even more, which has to build 8 wheels now instead of 6. Each wheel takes about 15-20 minutes because of Rust compilation in optimized mode And we use even more of PyPI's resources to host the two extra wheels, which is about 60mb extra per release. We're already in the top 10 worst projects for PyPI storage Maybe that's Worth It™️
👍🏻 1
s
i just have a vague memory of something CI related... apart from that, i'm on your page with this one. having to work with pyenv to make it run isn't the best solution. it might be okay for edge distros, but it should be usable on ubuntu stable
that's why i said "ready to be educated on this"
still being relatively new here and just trying to be helpful :X
❤️ 1
h
still being relatively new here
Aside: that makes your opinion particularly valuable 💜 we think a lot about "the curse of knowledge": https://en.wikipedia.org/wiki/Curse_of_knowledge. Our goal is to make Pants a joy to use, including that it's intuitive for newcomers. So we very actively need the perspective of newcomers to do that 🙂 we were on a podcast episode about this! https://www.devopsinstitute.com/ep69-the-curse-of-knowledge-with-eric-arellano-and-nick-grisafi/
s
i've been actively taking notes on my onboarding for about a month now
🙌 1
💯 1
and i did share my impressions on multiple occasions by now
❤️ 1
f
I'll admit that the workaround for this in fedora is very painless (
dnf -y install python3.9
). I imagine this is similar for other non-deb distros. Having used Python on Ubuntu for a while, I got used to just having pyenv or asdf myself because deb repos are too slow moving, and hacks like
deadsnakes
are not well-tested and can break other features of your system. If the number of wheels in PyPI is an issue, as well as CI time, then perhaps the better solution for this is better docs.
Sounds like shipping an embedded python interpreter might be a better use of resources. 😄 I know this was a goal at some point, but I don't know how serious it was 🤔
h
Embedding Python into Pants is still a huge goal, and a consideration for the Onboarding push we've been doing the past 3-4 weeks. (I personally really want to be able to use Python 3.11 features & performance improvements)
👍🏻 1